Menu

Recovery Risk Explained — List User Sessions and Revoke One
📰

Recovery Risk Explained — List User Sessions and Revoke One

DEV Community: authentication·XerxesCross2735·5 days ago
#lo5yjebO
Reading 0:00
15s threshold

Device fingerprints can help a customer support team decide when to ask for more proof, but an unfamiliar device should not automatically strand a legitimate customer. Resolve that trade-off by keeping recovery policy separate from session ownership. TL;DR: list sessions for the signed-in user, display last-seen information, mark the current session, and revoke a selected session by ID. Take the user ID from the verified session, never from the request body.

Keep authorization deterministic.

How should account settings list sessions and revoke one?

The server verifies the incoming session and derives its user ID. It retrieves that user's inventory, then the account settings page renders last-seen information and a current-session marker. On a revoke click, the server checks the selected session against the verified user's inventory before performing the write and recording the actor. Device-fingerprint scoring runs alongside that flow, deciding which recovery path needs additional verification.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.