Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force Invalid Bearer token in web api?

I had to delete over 90 users in my web api. I am using web api 2 individual account. But after deleting this users, they still can use my web-api, because access token are cached somewhere. How to prevent that?

like image 372
garret Avatar asked Jun 04 '14 18:06

garret


1 Answers

because tokens are stored on the client and not on the server, u can't manually invalid token.


but i found three solutions:
1'st - Just wait until tokens expire (14 days, it was too long for me)
2'nd - changing the date on the server, when i add'ed 14 days to server date, All tokens expired (but on production server this was unacceptable)
3'rd - Changing machine key on server.

like image 97
garret Avatar answered Nov 15 '22 20:11

garret