Skip to content

OAuth2 filter: csrf token validation failed when multiple requests access a route with OAuth2 filter simultaneously #41902

Closed

Description

@zhaohuabing

Title: csrf token validation failed when multiple requests access a route with OAuth2 filter simultaneously

Description:

When multiple concurrent requests hit a route protected by the OAuth2 filter, only the last request completes successfully. The other requests fail with error "OAuth flow failed", and envoy log reports that “csrf token validation failed” or "PKCE verification failed: Code mismatch".

Repro steps:

  1. Open multiple browser tabs pointing to a URL that requires OAuth2 filter authentication.
  2. In the first tab, log in using valid user credential.
  3. After successful login, the last tab is redirected correctly to the target URL, while the others display "OAuth flow failed".

Originally reported at Envoy Gateway: envoyproxy/gateway#7205

Activity

  1. added
    triage
    on Nov 8, 2025
  2. zhaohuabing commented on Nov 8, 2025

    @zhaohuabing
    MemberAuthor

    /assign

  3. added and removed
    triage
    on Nov 8, 2025
  4. github-actions commented on Dec 8, 2025

    @github-actions

    This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

  5. added
    stale
    on Dec 8, 2025
  6. removed
    stale
    on Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions