diff --git a/core/src/proxy/auth.rs b/core/src/proxy/auth.rs index ed4c223ca2..c284ee1af5 100644 --- a/core/src/proxy/auth.rs +++ b/core/src/proxy/auth.rs @@ -147,7 +147,7 @@ pub async fn maybe_refresh_auth_tokens( } else if should_refresh_access { let new_access_token = timeout( *connection_timeout, - refresh_access_token(auth_service_client, refresh_token.clone()), + refresh_access_token(auth_service_client, refresh_token), ) .await .map_err(|_| ProxyError::MethodTimeout("refresh_access_token".to_string()))? @@ -161,11 +161,11 @@ pub async fn maybe_refresh_auth_tokens( pub async fn refresh_access_token( auth_service_client: &mut AuthServiceClient, - refresh_token: Token, + refresh_token: &Token, ) -> crate::proxy::Result { let response = auth_service_client .refresh_access_token(RefreshAccessTokenRequest { - refresh_token: refresh_token.value, + refresh_token: refresh_token.value.clone(), }) .await .map_err(|e| ProxyError::AuthenticationError(e.to_string()))?;