Reputation: 73
I have a Web API which is issuing Bearer Token after successful login check. And API is set with Token Expiration time as 1 day and its working fine.
What I want is to expire a that token before its scheduled time (like 1 hour) if user sends a log out request, so that token won't work after that.
Is it possible?
Upvotes: 0
Views: 1610
Reputation: 1134
Because tokens are stored on the client and not on the server, You can't manually invalid token. I had similar problem once, in this question
Upvotes: 0
Reputation: 7866
As per my point of view, there is no need to expire generated token manually. Though you want to do so, you need to update(refresh) token expire time to the current request time, make sense?
But in that case, you will need to create a new token every time even if user logout and login before expiration time.
Upvotes: 0