mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-12 01:45:56 -05:00
[PR #6629] [MERGED] Try old refresh token if we fail to decode jwt #7456
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/6629
Author: @dani-garcia
Created: 12/29/2025
Status: ✅ Merged
Merged: 12/29/2025
Merged by: @dani-garcia
Base:
main← Head:try-old-refresh-token📝 Commits (1)
dcb4491Try old refresh token if we fail to decode jwt📊 Changes
1 file changed (+14 additions, -2 deletions)
View changed files
📝
src/auth.rs(+14 -2)📄 Description
The mobile apps don't seem to handle an error during the usage of
refresh_tokenvery well, so this code adds a backwards compatibility path to process the access token the old school way when it fails to decode as a JWT.To test that this worked, what I've done is:
preserve logenabled) try to unlock, which will make a successful /connect/token call with the refresh tokenpreserve logenabled) try to unlock, this will return a 401, which will redirect you back to the login screenWith this patch, the connect call will succeed and return a new JWT refresh token.
Should fix https://github.com/dani-garcia/vaultwarden/issues/6610
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.