setting $Configuration['Garden']['Authenticator']['SignOutUrl']
I am trying SSO in forums. I've tried sign-out url of my other site to log out from the my forum site.
I set $Configuration['Garden']['Authenticator']['SignOutUrl'] in config.php as follows:
$Configuration['Garden']['Authenticator']['SignOutUrl'] = 'https://local.myhome.com/signout/';
Unfortunately, i cannot get any effect after doing that.
i just want to change sign out url in forum into our site's signout.
If you have some solutions, please let me know.
Thanks
0
Comments
have you tried ?
$Configuration['Garden']['Authenticator']['SignOutUrl'] = '/signout/{Session_TransientKey}?Target=%2$s';assuming that is an actual sign out action page...I may be wrong but I think there is more to signing out than just a url.
you could also maybe create a route to replace the one going to the "original sign out sheet" and put a new route to the new sign out, in the dashboard Routes options.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
It looks like that basically does nothing
there are two ways of dealing with this server rules / vanilla routes e.g. go to /dashboard/routes
click Add Route
entry/signouthttps://local.myhome.com/signout/301 PermanentOr
you can predefine the
SignOutUrlfunctionif you create a file called
bootstap.before.phpinconf/and put<?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 ? urlencode($Target) : '')); return $SignOutUrl; }Note most signout on frameworks like wordress supply a nonce (what vanilla calls a TransientKey), without this it will ask the user if they are meaning to sign out as it could be a malicious action. You would have to be able to set a nonce in the native framework to get round this. Also there is a target field. Most frameweorks will have a redirect param (called Target in Garden). in wordpress you use
redirect_to=urlgrep is your friend.
Thank you so much. I can change sign out URL thanks to you. But I still have some problems. I click signout button in forums which moves to my site's signout so I can log-out from my site. But i am still logined in Forums and cannot logout.