Skip to content

Commit 09a32b4

Browse files
authored
fix: remove OAuth2 verification data after use (#3777)
1 parent a8ff4e8 commit 09a32b4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tee-worker/omni-executor/rpc-server/src/verify_auth.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ async fn verify_oauth2_provider<
163163
return Err(AuthenticationError::OAuth2Error("State verifier not found".to_string()));
164164
};
165165

166+
if let Err(e) = state_verifier_storage.remove(&key) {
167+
tracing::warn!("Failed to remove OAuth2 verification data: {:?}", e);
168+
}
169+
166170
if verification_data.state != payload.state {
167171
return Err(AuthenticationError::OAuth2Error("State verifier mismatch".to_string()));
168172
}

0 commit comments

Comments
 (0)