简体   繁体   中英

ember simple auth invalidate other user

I'm new to ember-simple-auth and I need some help. Say, there are 3 users, User A is Admin, User B and C are User. User C somehow able to hack User B's account and currently is logged in as User B. User B asked User A to reset his password.

I want to invalidate User C's session (who is currently logged in as User B) after User A reset User B's password.

I'm thinking of saving each user's session in a database and every time the user logs out, the session in database is also removed.

Just delete or reset the user's token on the server side. The next time they make a request with the old token they'd receive a 401 and will be logged out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM