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.

jsConnect auto signout problem

Dennis43Dennis43 New
edited February 2015 in Vanilla 2.0 - 2.8

Im trying to use the auto signout code but it doesnt working. It keeps me login in the main (Laravel) site so it keeps auto re-login in the forum too

In the config.php im having
$Configuration['Garden']['Authenticator']['SignOutUrl'] = 'http://domain.com/logout'; /Its the logout url of the main site

In the boostrap.before.php
<?php if (!defined('APPLICATION')) exit();
function SignOutUrl($Target = '') {
$SignOutUrl = C('Garden.Authenticator.SignOutUrl','/signout/{Session_TransientKey}?Target=%2$s');
$SignOutUrl = FormatString($SignOutUrl,array('Session_TransientKey'=>Gdn::Session()->TransientKey()));
$SignOutUrl = sprintf($SignOutUrl,($Target ? '&Target='.urlencode($Target) : ''));
return $SignOutUrl;
}

Any ideas how to fix this?

Thanks in advance :)

Comments

  • do you have a link?

    grep is your friend.

  • Dennis43Dennis43 New
    edited February 2015

    First thanks x00 for trying to help =)

    Let me explain you better what is going on...

    Im having a laravel site and i used https://github.com/pdefreitas/Laravel-VanillaSSO for implementing the SSO. I did the JS Connect test and i got the respond
    test({"email":"whatever@gmail.com","name":"Den","photourl":"","roles":"","uniqueid":1,"client_id":"8737398317","signature":"d37a5dd65f0f409f76433f3963b73d12"}) //putted random id/sig so everything seems ok.

    Today, i noticed that the problem starts when i try to use JSConnect without the auto signin and im getting a response "Whoops! error"...but i dont know what is the error exactly (i have no idea how to debug it)..If i use also your plugin its getting logged in automatically with no errors but i cant manage to forward logout url (its redirecting me to the whatever.com/forum/ url and not the main site whatever.com/logout url).

    Anyway, im sending you the forum url with PM since i dont want to make the url public.

    Thanks once again

  • I don't think you are using my plugin.

    grep is your friend.

  • Try once again, i ve disabled it before to do some tests

  • boostrap.before.php should be bootstrap.before.php

    grep is your friend.

  • Dennis43Dennis43 New
    edited February 2015

    Interesting... ahhahaha... Ive fixed it and now its forwarding to the main logout url but it doesnt passing through the logout url of the VF so im still logged in the forum...

    In the config i have
    $Configuration['Garden']['Authenticator']['SignOutUrl'] ='http://domain.com/logout';
    I tried also the
    http://domain.com/forum/entry/signout?{Session_TransientKey}?Target=http://domain.com/logout but no luck (im stuck in a loop)

    Any ideas why?

    Thanks!!

  • Dennis43Dennis43 New
    edited February 2015

    Nevermind...one more mistake. I changed to

    $Configuration['Garden']['Authenticator']['SignOutUrl'] = '/entry/signout/{Session_TransientKey}?Target=http://domain.com/logout'; and it working beautifully!!

    Thanks once again for your help x00 :)

  • good

    grep is your friend.

  • Hello x00, is there any lead regarding wordpress embeded?

    $Configuration['Garden']['Authenticator']['SignOutUrl'] = '/entry/signout/{Session_TransientKey}?Target=http://laravel.id/wp-login.php?action=logout';

    but when I log out from wordpress, the forum still there, and it cannot logged out
    how can I solve this?

Sign In or Register to comment.