Improve refresh token security in Login service #1245

Open
opened 2026-05-29 11:32:54 +00:00 by c24elipe · 0 comments
Collaborator

Today, a refresh token is removed and or written over in the database on a logout or a refresh.
A more secure method would have been to save each token (for as long as they would be within there life time), and assign each a token family (a shared ID).

This way, an extra security check could be done to check if the token was re-given again later (outside a recommended grace period of 10-30 seconds). For if it happens, then we can't know if each request is made from a hijacker of the account or the actual user. The best thing to do if that happens is to simply log the user out of everything.

The grace period is because if the user has a bad internet connection, the request can then be sent twice or more times.

Today, a refresh token is removed and or written over in the database on a logout or a refresh. A more secure method would have been to save each token (for as long as they would be within there life time), and assign each a token family (a shared ID). This way, an extra security check could be done to check if the token was re-given again later (outside a recommended grace period of 10-30 seconds). For if it happens, then we can't know if each request is made from a hijacker of the account or the actual user. The best thing to do if that happens is to simply log the user out of everything. The grace period is because if the user has a bad internet connection, the request can then be sent twice or more times.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K#1245
No description provided.