Can't login directly to vanilla with Wordpress account and vice versa

So, I've implemented vanilla and wordpress sso and login from wordpress site then access vanilla seems to be working.
But if I access the vanilla forum then login there then it won't work unless I've already logged with the account once.
And also, if I logged into vanilla and move back to wordpress site, I'm not logged into Wordpress.

What I'm looking for is perfect log in process.
Like: login and out only once and seamlessly between both. Can anyone guide me ?

«1

Comments

  • The trick is to force all logins through your WP site and then just redirect as appropriate.

    For example, on the WP side, make your forum link http://www.example.com/wp-login.php?redirect_to=http://www.example.com/forum/entry/jsconnect?client_id={JSCONNECT_ID}&Target=%2F when they are not logged in. If they are logged in, just use http://www.example.com/forum/.

  • So, from what I can see, the trick you suggested is to force user to log in before they can access the forum ?
    What I don't like is I want users to be able to view the forum without needing to sign in.
    And also, can you suggest some ways to make log out and register work smoothly too ?

  • Redirect the signout from Vanilla to your WP logout. Or vice versa.

    You can change what URL is used for the sign-in, sign-out, and register links with the following configuration options:

    $Configuration['Garden']['Authenticator']['RegisterUrl']        = '/entry/register?Target=%2$s';
    $Configuration['Garden']['Authenticator']['SignInUrl']          = '/entry/signin?Target=%2$s';
    $Configuration['Garden']['Authenticator']['SignOutUrl']         = '/entry/signout/{Session_TransientKey}?Target=%2$s';
    

    You can put absolute paths in there to your WP install.

    BTW, these options need to be placed in /conf/config.php.

  • Where is that /conf/config.php file ? Is it in my wordpress install or the vanilla folder ? I'm still kinda new to all of this so sr if I asked anything so simple.

  • peregrineperegrine MVP
    edited November 2014

    Gogito said:Where is that /conf/config.php file ?

    conf folder is In the root of the folder where you installed vanilla

    config.php is in the conf folder.

    http://vanillaforums.org/discussion/28420/faq-what-frequently-asked-questions-would-you-like-to-see-in-a-faq-help

    http://vanillaforums.org/docs/folderstructure

    Vanilla Folder Structure

    http://vanillawiki.homebrewforums.net/index.php/Folder_Structure

  • I just wanted to add that setting $Configuration['Garden']['Registration']['Method'] = 'Connect'; in your /conf/config.php file should forward any sign in attempt from Vanilla to your connected software.

  • @hgtonight said:
    Redirect the signout from Vanilla to your WP logout. Or vice versa.

    You can change what URL is used for the sign-in, sign-out, and register links with the following configuration options:

    $Configuration['Garden']['Authenticator']['RegisterUrl']        = '/entry/register?Target=%2$s';
    $Configuration['Garden']['Authenticator']['SignInUrl']          = '/entry/signin?Target=%2$s';
    $Configuration['Garden']['Authenticator']['SignOutUrl']         = '/entry/signout/{Session_TransientKey}?Target=%2$s';
    

    You can put absolute paths in there to your WP install.

    BTW, these options need to be placed in /conf/config.php.

    What is the url from Wordpress did you mean ? I can't seem to find it ? Is it the link to the form ? And can you suggest a way to redirect back to the current forum page from those link ?

  • GogitoGogito New
    edited November 2014

    @hgtonight said:
    Use something like

    http://www.example.com/wp-login.php?redirect_to=http://www.example.com/forum/entry/jsconnect?client_id=

    append your jsConnect client id to the end of that.

    I've just notice something: I checked out this video from you guys http://www.youtube.com/watch?v=mm7TBtJeP5A
    And it seems that both the login and register process for you guys are different from mine. When I click on login, I don't get taken to the wordpress login but a popup appear to let me login and also for the register. I'm using the Bootstrap theme. Maybe this is the problem. Anay suggestion. What I wanted is to be exactly like that video that you guys posted.

    And also, if I switched the connect method to SSO only, the register buttton disappear

  • That is what the Sign In- and Register URL are for. Have you followed the steps in the video and the jsconnect documentation?

  • Yes, i did but it doesn't seems to work. Clicking on them show the vanilla login and register.

  • Post, what's in your config.php for:

    $Configuration['Garden']['Authenticator']['RegisterUrl']
    $Configuration['Garden']['Authenticator']['SignInUrl']
    $Configuration['Garden']['Authenticator']['SignOutUrl']
    
  • @Bleistivt said:
    Post, what's in your config.php for:

    $Configuration['Garden']['Authenticator']['RegisterUrl']
    $Configuration['Garden']['Authenticator']['SignInUrl']
    $Configuration['Garden']['Authenticator']['SignOutUrl']
    

    That's weird, I can't see those line anywhere.

  • BleistivtBleistivt Moderator
    edited November 2014

    Then you need to read hgtonights post again, you need to set these to your wordpress install.

    Didn't check, but I'm pretty sure you can also set those on the jsconnect setting page (/dashboard/settings/jsconnect)

  • @Bleistivt said:
    Then you need to read hgtonights post again, you need to set these to your wordpress install.

    Didn't check, but I'm pretty sure you can also set those on the jsconnect setting page (/dashboard/settings/jsconnect)

    Yes, i did set those in jsconnect but it didn't work apparently. I'll try add them manually now. Just curious, I'm using the Wordpress plugin, are the links in the plugin the ones I need to copy to ?

  • GogitoGogito New
    edited November 2014

    Well, this is what I have now

        $Configuration['Garden']['Authenticator']['RegisterUrl']        = 'http://mmo4teen.com/wp-login.php?action=register';
        $Configuration['Garden']['Authenticator']['SignInUrl']          = 'http://mmo4teen.com/wp-login.php?redirect_to={Target}';
        $Configuration['Garden']['Authenticator']['SignOutUrl']         = '/entry/signout/{Session_TransientKey}?Target=%2$s';
    

    But it still doesn't work. Any ideas ?

  • @Bleistivt said:
    Then you need to read hgtonights post again, you need to set these to your wordpress install.

    Didn't check, but I'm pretty sure you can also set those on the jsconnect setting page (/dashboard/settings/jsconnect)

    I tried install the new version in github and adding those line but still it's not working. Any ideas ?

  • @hgtonight said:
    I just wanted to add that setting $Configuration['Garden']['Registration']['Method'] = 'Connect'; in your /conf/config.php file should forward any sign in attempt from Vanilla to your connected software.

    Have you tried this?

    Also, your redirect after registration leads to a 404.

  • @Bleistivt said:
    Also, your redirect after registration leads to a 404.

    I don'don't understand what that means? Can you make it clearer? ?

Sign In or Register to comment.