simplesamlphp / simplesamlphp-module-authorize

This module provides a user authorization filter based on attribute matching
GNU Lesser General Public License v2.1
5 stars 5 forks source link

Logout button no longer works #14

Open thijskh opened 1 month ago

thijskh commented 1 month ago

The template has a logout button but the LogoutURL is constructed as a login url without ReturnTo parameter:

https://github.com/simplesamlphp/simplesamlphp-module-authorize/blob/bb2436f9310b17a520194e63ca4842b14d3f328a/src/Controller/Authorize.php#L68

so this fails with a Missing ReturnTo parameter error when clicked.

Probably the same issue applies to the cardinality module.

tvdijen commented 1 month ago

Can we use $state['Source']['auth'] to get the authsource (Auth\Source::getById()) and call logout() on it?

thijskh commented 1 month ago

The modules now just render a button with a link to what was previously (in 0.9): core/authenticate.php?as=...&logout. I don't think that target exists anymore. What you say might be possible but it would need a separate route in the module to invoke that when the button is pressed.

tvdijen commented 1 month ago

There is core/logout/{as} ?

thijskh commented 4 weeks ago

One challenge there is that it requires some ReturnTo parameter to be specified and I'm unsure what a good value would be.

tvdijen commented 4 weeks ago

I guess frontpage.redirect is the perfect value for that?