diff --git a/crates/bitwarden/src/auth/renew.rs b/crates/bitwarden/src/auth/renew.rs index 6f93f7482..783494ae2 100644 --- a/crates/bitwarden/src/auth/renew.rs +++ b/crates/bitwarden/src/auth/renew.rs @@ -56,11 +56,8 @@ pub(crate) async fn renew_token(client: &mut Client) -> Result<()> { .send(&client.__api_configurations) .await?; - if let ( - IdentityTokenResponse::Authenticated(r), - Some(state_file), - Ok(enc_settings), - ) = (&result, state_file, client.get_encryption_settings()) + if let (IdentityTokenResponse::Payload(r), Some(state_file), Ok(enc_settings)) = + (&result, state_file, client.get_encryption_settings()) { if let Some(enc_key) = enc_settings.get_key(&None) { let state = @@ -83,6 +80,10 @@ pub(crate) async fn renew_token(client: &mut Client) -> Result<()> { client.set_tokens(r.access_token, r.refresh_token, r.expires_in); return Ok(()); } + IdentityTokenResponse::Payload(r) => { + client.set_tokens(r.access_token, r.refresh_token, r.expires_in); + return Ok(()); + } _ => { // We should never get here return Err(Error::InvalidResponse);