|
|
@ -1239,14 +1239,14 @@ pub async fn refresh_tokens( |
|
|
|
|
|
|
|
|
let auth_tokens = match refresh_claims.sub { |
|
|
let auth_tokens = match refresh_claims.sub { |
|
|
AuthMethod::Sso if CONFIG.sso_enabled() && CONFIG.sso_auth_only_not_session() => { |
|
|
AuthMethod::Sso if CONFIG.sso_enabled() && CONFIG.sso_auth_only_not_session() => { |
|
|
AuthTokens::new(&device, &user, refresh_claims.sub, client_id, Some(&refresh_claims)) |
|
|
AuthTokens::new(&device, &user, refresh_claims.sub.clone(), client_id, Some(&refresh_claims)) |
|
|
} |
|
|
} |
|
|
AuthMethod::Sso if CONFIG.sso_enabled() => { |
|
|
AuthMethod::Sso if CONFIG.sso_enabled() => { |
|
|
sso::exchange_refresh_token(&device, &user, client_id, refresh_claims).await? |
|
|
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::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 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, Some(&refresh_claims)), |
|
|
AuthMethod::Password => AuthTokens::new(&device, &user, refresh_claims.sub.clone(), client_id, Some(&refresh_claims)), |
|
|
_ => err!("Invalid auth method, cannot refresh token"), |
|
|
_ => err!("Invalid auth method, cannot refresh token"), |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|