© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
16 replies
AZAZEL

Invalidate JWT-Tokens on logout and password change.

I have an ASP.net Web api that handles user interaction. For authentification I use JWT Tokens. I realize that these tokens are only a way to confirm claims and do not carry states in any way.
I want to give uses the ability to log out, i.e invalid tokens and change thier password. I do not like the approach of storing the password hash in the token as it can be read.
Also I have no clue if it would make sense to use a table for invalidated tokens and how I would go about implementing that feature.

If you have any input or pointers I could use to help me it would be greatly appreciated. : )
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ JWT Refresh tokens
C#CC# / help
3y ago
✅ .NET IdentityServer4 Password Reset + Logout Fails to Invalidate Angular SPA Session
C#CC# / help
6mo ago
Handling [Autorize] attribute without oAuth/jwt tokens.
C#CC# / help
3y ago
Is setting Jwt and fresh tokens as HTTP only cookies good ?
C#CC# / help
11mo ago