-
-
Notifications
You must be signed in to change notification settings - Fork 462
Add on_after_logout method to user_manager #1427
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
base: master
Are you sure you want to change the base?
Conversation
fastapi_users/fastapi_users.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was autoformatting done by running the linting command
hatch run lint
Will this RP be merged? |
@heiskane is it possible to release this please? |
Yes its ready to merge. |
Hello. Can you merge and release please @heiskane? |
Hey. To clarify I'm not a maintainer in this repository so i don't have the ability to merge. Not sure if there is anything else needed of me here as there are no conflicts with this branch. |
@frankie567 could you please let us know the current status of this feature? |
Allows to perform custom logic (analytic etc.) after logout for the same reasons as in
on_after_login
.I am currently using fast-api for serving html content. I know its not the primary use-case for it but its pretty well supported. Because of this login/logout requests come from html forms instead of api calls from javascript so login/logout routes need to handle http redirects. For login requests its easy to handle with the
on_after_login
method on the user_manager but for logouts there is no such option. Currently to add custom redirects to logout requires manually implementing both login and logout routes so having aon_after_logout
method would make things much more convenient.