vaultwarden/src/db
Mathijs van Veluw 235cf88231
Fix 2FA Remember to actually be 30 days (#6929)
Currently we always regenerate the 2FA Remember token, and always send that back to the client.
This is not the correct way, and in turn causes the remember token to never expire.

While this might be convenient, it is not really safe.
This commit changes the 2FA Remember Tokens from random string to a JWT.
This JWT has a lifetime of 30 days and is validated per device & user combination.

This does mean that once this commit is merged, and users are using this version, all their remember tokens will be invalidated.
From my point of view this isn't a bad thing, since those tokens should have expired already.

Only users who recently checked the remember checkbox within 30 days have to login again, but that is a minor inconvenience I think.

Signed-off-by: BlackDex <black.dex@gmail.com>
2026-03-23 23:12:07 +01:00
..
models Fix 2FA Remember to actually be 30 days (#6929) 2026-03-23 23:12:07 +01:00
mod.rs Improve sso auth flow (#6205) 2025-12-06 22:20:04 +01:00
query_logger.rs Use Diesels MultiConnections Derive (#6279) 2025-10-29 21:04:30 +01:00
schema.rs Improve sso auth flow (#6205) 2025-12-06 22:20:04 +01:00