mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-05-23 00:25:37 -05:00
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/6360
Author: @Ajsmith1435
Created: 10/14/2025
Status: ❌ Closed
Base:
main← Head:authentik-refresh📝 Commits (2)
e16a242sso(authentik): always surface current provider refresh token from exchangeefa54a4Update sso.rs - sso(authentik): always adopt rotated provider refresh token to prevent invalid_grant📊 Changes
2 files changed (+15 additions, -7 deletions)
View changed files
📝
src/sso.rs(+2 -2)📝
src/sso_client.rs(+13 -5)📄 Description
Fix SSO refresh with Authentik by always adopting the IdP’s rotated refresh token, preventing invalid_grant and premature re-login.
Changes
src/sso_client.rs: exchange_refresh_token always returns Some(current_refresh_token) (rotated if provided, else the one just used).
src/sso.rs: remove fallback to old token; pass the returned token directly to create_auth_tokens.
Why?
Authentik revokes the old refresh token on rotation; reusing it triggers invalid_grant. See
Testing
SSO with Authentik → let access token expire → refresh repeatedly. Expect no invalid_grant; rotated token adopted each cycle.
Refs
Fixes #6311
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.