Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vanilla / codeigniter login integration with jsconnect / SSO

Does anyone have any experience using this plugin? i've acquired the client library for php, and setup the appropriate functions in my controller. i get a valid response when i click "test" from the plugin settings page in vanilla, but now i'm stuck... where do i go from here?

to be more clear about the issue, i dont know what my next step is. What I mean is, I know I must be missing something... heres the controller function (or page) i'm using as the endpoint for the plugin :

// 1. Get your client ID and secret here. 
$clientID = "1234";
$secret = "1234";

// 2. Grab the current user from your session management system or database here.
//so i check to see if the user is logged in to my codeigniter's auth
//all works fine

// 3. Fill in the user information in a way that Vanilla can understand.
$user = array();

if ($signedIn) {
// i then set these according to the user info of the logged in user
$user['uniqueid'] = '123';
$user['name'] = 'John PHP';
$user['email'] = '[email protected]';
$user['photourl'] = '';
}

// 4. Generate the jsConnect string.
$secure = true; 
WriteJsConnect($user, $_GET, $clientID, $secret, $secure);

http://vanillaforums.org/docs/jsconnect is the docs site, which makes no mention of what to do past my current point.

like image 225
jessie james jackson taylor Avatar asked May 10 '12 11:05

jessie james jackson taylor


1 Answers

I had to figure this out for myself as well, and did so finally last night. I have written up the files and put them into a github repo so that other people with CodeIgniter can enjoy the JsConnect features with their sites more easily. I really like it now that it is working!

You can download the code and just follow the readme here: https://github.com/mandersondesign/JSConnect-Codeigniter

If there are any issues that you have, let me know and I will help you out!

like image 67
janson0 Avatar answered Nov 15 '22 10:11

janson0