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

Added user logout using blacklist and revoking jit #16

Merged
merged 2 commits into from May 7, 2018

Conversation

jslvtr
Copy link
Contributor

@jslvtr jslvtr commented May 5, 2018

To perform user logout, it is recommended that we blacklist individual tokens (which can be identified with their unique jit) and keep track of them (normally in a database, but in this case in an in-memory set).

Added a UserLogout resource and modified the blacklist loader slightly to achieve this.

@CristianoYL
Copy link
Contributor

Do we need to modify the UserLogin and TokenRefresh resources to collaborate with the blacklist?

@jslvtr
Copy link
Contributor Author

jslvtr commented May 6, 2018

I don't think so, let me give it a go. This uses the Flask-JWT-Extended blacklist so it should all work together.

@jslvtr
Copy link
Contributor Author

jslvtr commented May 6, 2018

Just tested it, all works. When you logout and then try to log in, you get a "Your token has been revoked" message. 💥

@CristianoYL CristianoYL merged commit b14d593 into master May 7, 2018
@jslvtr jslvtr deleted the add_user_logout_using_blacklist branch August 11, 2021 10:48
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.

None yet

2 participants