Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.2k views
in Q2A Core by
I would want to integrate Q2A with vanilla forum. I have currently working one Q2A site that I want to operate as a main site and I want to add vanilla forum as a subsite with Single Sign On integration.

But in vanilla there is an option that I couldn't find enywhere in Q2A:

Authenticate URL
The behind-the-scenes URL that shares identity information with Vanilla

 

How can I integrate vanilla to use Q2A's login information?

1 Answer

+1 vote
by

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 :)

...