A
A
asdz2014-11-11 13:01:40
ASP.NET
asdz, 2014-11-11 13:01:40

How to invalidate bearer token in ASP Identity?

There was a task to disconnect system users. I do it like this:

userManager.SetLockoutEnabled(user.Id, true);
userManager.SetLockoutEndDate(user.Id, DateTimeOffset.MaxValue);
userManager.Update(user);
userManager.UpdateSecurityStamp(user.Id);

If the client authorized using the bearer token, then the token continues to be valid until its expiration despite userManager.UpdateSecurityStamp(user.Id);
What do you suggest?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question