Skip to content

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

heiskane
Copy link

@heiskane heiskane commented Aug 4, 2024

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 a on_after_logout method would make things much more convenient.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Author

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

@hgalytoby
Copy link
Contributor

Will this RP be merged?

@integrajerome
Copy link

@heiskane is it possible to release this please?

@heiskane
Copy link
Author

@heiskane is it possible to release this please?

Yes its ready to merge.

@integrajerome
Copy link

Hello. Can you merge and release please @heiskane?

@heiskane
Copy link
Author

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.

@meznar12
Copy link

@frankie567 could you please let us know the current status of this feature?

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

Successfully merging this pull request may close these issues.

4 participants