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.

Default SignOutUrl in functions.render.php method doesn't use Gdn::Authenticator

edited March 2012 in Vanilla 2.0 - 2.8

Hi,
while playing around with sso options for drupal and vanilla, I have found something when trying to single sign out :
the default method which generates the sign out link doesn't use the Gdn::Authenticator->SignOutUrl() method.
in functions.render.php :

if (!function_exists('SignOutUrl')) { function SignOutUrl($Target = '') { return '/entry/signout?TransientKey='.urlencode(Gdn::Session()->TransientKey()).($Target ? '&Target='.urlencode($Target) : ''); } }

So overriding $Configuration['Garden']['Authenticator']['SignOutUrl'] in config.php has no effect.
Shouldn't it be something like :

if (!function_exists('SignOutUrl')) { function SignOutUrl($Target = '') { return Gdn::Authenticator()->SignOutUrl($Target); } }

Thanks in advance for your help,

David

Best Answer

  • ToddTodd Vanilla Staff
    Answer ✓

    We are slowly moving away from the authenticator and setting the signout url in the config will no longer work. There are a couple of strategies you can use to change your signout url.

    1. Add a route that redirects to your preferred signout page.
    2. Add a EntryController_BeforeSignOut_Handler() or EntryController_SignOut_Handler() function to a plugin and do what you want there.

Answers

  • this plugin is shipped with the core so you can report this here:

    https://github.com/vanillaforums/Garden/issues

    grep is your friend.

  • ToddTodd Vanilla Staff
    Answer ✓

    We are slowly moving away from the authenticator and setting the signout url in the config will no longer work. There are a couple of strategies you can use to change your signout url.

    1. Add a route that redirects to your preferred signout page.
    2. Add a EntryController_BeforeSignOut_Handler() or EntryController_SignOut_Handler() function to a plugin and do what you want there.
  • Thanks for these answers !
    I will go for a Vanilla Plugin !

Sign In or Register to comment.