Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch user targetUrl config to redirect after login/logout #804

Open
richardvil opened this issue Nov 4, 2022 · 2 comments
Open

Switch user targetUrl config to redirect after login/logout #804

richardvil opened this issue Nov 4, 2022 · 2 comments

Comments

@richardvil
Copy link

Feature description

Hi, I was wondering if it's possible to add two new parameters to set a targetUrl to redirect after login and logout. Something like:

grails.plugin.springsecurity.switchUser.afterLoginTargetUrl
grails.plugin.springsecurity.switchUser.afterLogoutTargetUrl

This configurations are only to customize that behaviour, otherwise the plugin takes the value of: grails.plugin.springsecurity.switchUser.targetUrl

If it's possible, just point me the right direction and I will make a PR.

@matrei
Copy link
Contributor

matrei commented Nov 7, 2023

@richardvil Does not grails.plugin.springsecurity.successHandler.defaultTargetUrl and grails.plugin.springsecurity.logout.afterLogoutUrl do the job?

@richardvil
Copy link
Author

I didn't realize of the switchUser.targetUrl configuration, but it would be nice something similar for the logout, because the grails.plugin.springsecurity.logout.afterLogoutUrl doesn't works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants