Vanilla / Encoder Login Integration Using jsconnect / SSO

Does anyone have experience using this plugin? I purchased a client library for php and installed the appropriate functions in my controller. I get a valid answer when I click "test" from the plugin settings page in vanilla, but now I'm stuck ... where can I go from here?

To be more clear about the problem, I do not know what my next step is. I mean, I know I'm missing something ... heres a controller function (or page) that I use 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 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'] = ' john.php@anonymous.com '; $user['photourl'] = ''; } // 4. Generate the jsConnect string. $secure = true; WriteJsConnect($user, $_GET, $clientID, $secret, $secure); 

http://vanillaforums.org/docs/jsconnect is a document site that doesn't mention what to do from my current point.

+6
source share
1 answer

I also had to understand this for myself, and finally did it last night. I wrote the files and put them in the github repository so that other people with CodeIgniter can more easily use the JsConnect functions with their sites. I really like it working now!

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

If there are any problems you have, let me know and I will help you!

+3
source

Source: https://habr.com/ru/post/915392/


All Articles