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:
<?php
require_once 'qa-include/qa-base.php';
require_once 'qa-external/qa-external-users.php';
require_once QA_INCLUDE_DIR.'qa-db-selects.php';
require_once QA_INCLUDE_DIR.'qa-app-updates.php';
require_once QA_INCLUDE_DIR.'qa-app-users.php';
require_once QA_INCLUDE_DIR.'qa-app-format.php';
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 :)