Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.

Great plugin, but problems with JsConnect / SSO

This discussion is related to the FirstLastNames addon.
ben_sevenben_seven New
edited June 2012 in Feedback

Hi,

Your plugin seems great, with one problem.

I'm using jsConnect to hook the forum into Wordpress.

This creates a new user in Vanilla when they are logged into the Wordpress site and view the forum for the first time.

With your plugin enabled, this flow is broken, because user registration is not allowed to proceed without a FirstName / LastName, which it's clearly not getting from JSConnect (and even if it could, not all users will have a Firstname and Lastname set on the WP install). So this auto-login and registration breaks with 'Signature required' etc due to missing fields.

So it breaks the connection, and so I can't use it because having users access the forum is more important than displaying their names nicely (obviously).

The update I would request is a flag to set in the plugin settings, that stops this information from being required. Just to have the option would mean that SSO via JSConnect continues to work, but users have the option of going and setting a Nicename for display via your plugin.

Thanks.

Comments

  • I believe making those fields not required (optional) should solve this problem. I'm implementing this to my forum but when I sign in for the first time, it says "FirstName is required" or something similar. I enabled show nickname though. Before I set it to show nickname, it will prompt "FirstName is required" and "LastName is required" instead of just FirstName.

    So, I edited the Structure() function in class.firstlastnames.plugin.php to have this:

    ->Column('FirstName', 'varchar(50)', NULL)
    ->Column('LastName', 'varchar(50)', NULL)

    I believe "NULL" is the key here. Then I disable and re-enabled the plugin, and voila!
    Try this out and see how it works out for you.

    hgtonight
  • Hey there!

    I'm having some issues with jsConnect as well. I get caught on the "Connecting..." screen. Are you using any kind of plugins with jsConnect, like ProxyConnect, to handle your SSO or are you just using jsConnect? This may be what is causing my issues. Thanks for the response, and sorry for the shameless thread-jack.

  • @josephting: Your suggested change seems to be included in the code base of the FirstLastNames addon now. However, it didn't do the trick for me. After a successful SSO sign on, I got stuck at a connect form that complained about required first name and last name without having any form fields to add the elements.

    Instead, in the authentication handler provided in the Authentication URL setting of jsConnect, I've simply added the array elements "username", "firstname", "lastname" to pass these values to the forum. Using the PHP jsConnect client library as starting point here's what we are passing to jsConnect now:

    // 3. Fill in the user information in a way that Vanilla can understand.
    $user = array(
        'uniqueid' => ...,
        'name' => ...,
        'username' => ...,
        'firstname' => ...,
        'lastname' => ...,
        'email' => ...,
        'photourl' => ...
    );
    
    hgtonightvrijvlinderibrahim
Sign In or Register to comment.