you must create a php file which generates logged in users information in a format that Vanilla can read.
first include qa-base.php and other requered files, it can be a good starting point:
then you can get user's information using functions in qa-app-users.php to get logged-in user's id, username, email. more info . Vanilla also has TransientKey which I'm not sure if Q2A uses it, you will need to research it.
put the file in Q2A's root. when you added the needed variables point Auth url to it and it'll be done. and make sure you share your work when it's done, others may find it usefull :)