Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

User roles in JSConnect being ignored?


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


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 & 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 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.


  • Options

    As an update i've just found the following line (221) commented out in class.jsconnect.plugin.php in the plugin

    $Form->SetFormValue('Roles', GetValue('roles', $JsData, ''));

    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

    $Configuration['Garden']['SSO']['SynchRoles'] = TRUE;

    Then I saw that this person was using the 2.1 branch so it probably wont have any impact for me.

  • Options
    BnoBno New
    edited August 2013

    I have fixed the issue with the Auto Connect plugin not working with the EmbedFriendly theme by adding

        {asset name="Foot"}

    in to the div with id foot in that themes default.master.tpl

  • Options
    hgtonighthgtonight ∞ · New Moderator

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

    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.

  • Options

    The 'roles' parameter was being ignored for me when i was using, 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.

Sign In or Register to comment.