-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Security] Add docs about success handlers for login and logout #802
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
Comments
+1 - a quick cookbook article on using both the |
The main use case I've had for logout is to reply with json instead of a redirect on ajax logout. |
I would write this and I'm trying to understand the handlers right now. One thing I don't understand is the constructor signature of the |
Actually, nevermind. I could overwrite the defaults passed to the service in my code. Makes sense to me. I'll see if I find the time tonight to write something! As for a use case, I thought about saving the last successfull login and logout in the user object as an example. It's not what many people will end up doing, but it shows the usage of both handlers ans is short enough to not confuse people. If you got another idea please let me know! |
Closing in favor of #4258, which contains a lot more details on how to fix it |
Johannes says it's not recommended to use security.interactive_login for redirections and such because they should not apply to all firewalls, and not all auth types. In any case, if you ignore that and do it anyway, there is no event for logout, so you get stuck eventually if you try to cover that as well.
The text was updated successfully, but these errors were encountered: