mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-06 08:27:18 +01:00
Pass correct type
This commit is contained in:
parent
aea2b84de9
commit
9b44d0474f
1 changed files with 2 additions and 2 deletions
|
|
@ -1239,14 +1239,14 @@ pub async fn refresh_tokens(
|
|||
|
||||
let auth_tokens = match refresh_claims.sub {
|
||||
AuthMethod::Sso if CONFIG.sso_enabled() && CONFIG.sso_auth_only_not_session() => {
|
||||
AuthTokens::new(&device, &user, refresh_claims.sub, client_id, refresh_claims)
|
||||
AuthTokens::new(&device, &user, refresh_claims.sub, client_id, Some(&refresh_claims))
|
||||
}
|
||||
AuthMethod::Sso if CONFIG.sso_enabled() => {
|
||||
sso::exchange_refresh_token(&device, &user, client_id, refresh_claims).await?
|
||||
}
|
||||
AuthMethod::Sso => err!("SSO is now disabled, Login again using email and master password"),
|
||||
AuthMethod::Password if CONFIG.sso_enabled() && CONFIG.sso_only() => err!("SSO is now required, Login again"),
|
||||
AuthMethod::Password => AuthTokens::new(&device, &user, refresh_claims.sub, client_id, refresh_claims),
|
||||
AuthMethod::Password => AuthTokens::new(&device, &user, refresh_claims.sub, client_id, Some(&refresh_claims)),
|
||||
_ => err!("Invalid auth method, cannot refresh token"),
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue