User roles in JSConnect being ignored?
Hi.
I have JSConnect all up and running except it seems to pay no attention to anything in the Json object about roles. E.g. I have the following blob of Json
jQuery162017140560606869182_1375279700242({ "uniqueid":"v3BojFdnPO8", "name":"hans", "email":"test@example.com", "roles":"Administrator", "client_id":"1242375698", "signature":"12345da0451c477ef0b680b899c92e9" });
And although the user is signed in fine, they are always signed in solely as a member rather than as an administrator like they ought to be.
I am running vanilla 2.0.18.8 & JSConnect 1.0.3b & am embedding the whole forum in to a page on my site.
I found a bug in implementing that when I took my connection out of test mode and went live I continuously got an invalid signature
response to all attempted sign-ins through the plugin, I fixed this by changing my code to use md5 rather than sha1. The documentation says that you can use either hash but the plugin itself only works with md5 and makes no reference to sha1 whatsoever.
I also found that although I followed the steps in http://vanillaforums.com/blog/jsconnect-technical-documentation-for-embedded-sso/ to generate a var called vanilla_sso, nothing happens with my var after I've instantiated it, it's certainly not logging me in automatically as I would expect. The Auto SignIn plugin has let me get around this for now, but that returns a JS error when combined with the default EmbedFriendly theme so I am having to use the Mobile theme that comes as standard with Vanilla for the plugin to work in my site.
Thanks in advance for any help.
Comments
As an update i've just found the following line (221) commented out in class.jsconnect.plugin.php in the plugin
Uncommenting has no apparent effect but I certainly imagine it would need to be active code rather than commented out for anything to work. I also saw this line being added to conf/config.php in http://vanillaforums.org/discussion/19263/automatic-assigning-roles
Then I saw that this person was using the 2.1 branch so it probably wont have any impact for me.
I have fixed the issue with the Auto Connect plugin not working with the EmbedFriendly theme by adding
in to the div with id foot in that themes default.master.tpl
Welcome to the community!
I just wanted to thank you for not giving up and continuing to post back with the answer.
Hopefully this helps someone in the future
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
The 'roles' parameter was being ignored for me when i was using jsConnect.net, and so i sent a support email to vanilla forums. My resolve was two steps...
1) I needed to check the checkbox in jsConnect addon: 'This is trusted connection and can sync roles & permissions'.
2) In the dashboard under the Users/Registration link, i needed to change the way new users register to the value 'Connect', or more specifically, to require users to register through SSO plugin.
This fixed my issue.