ory / ory/hydra

Not able to perform simultaneous auth flows with the same client

Open
#3,757 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
17.6k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Preflight checklist
Ory Network Project

No response

Describe the bug

Hydra does not support simultaneous auth flows for the same client in the same browser.

Reproducing the bug
  • Initiate the hydra OIDC flow for the same client in two or more tabs of the same browser
  • Attempt to complete login in any except the last tab that initiated the flow
  • Error: request_forbidden reason:The CSRF value from the token does not match the CSRF value from the data store.
Relevant log output

No response

Relevant configuration

No response

Version

v2.2.0

On which operating system are you observing this issue?

None

In which environment are you deploying?

None

Additional Context

I have an app that provides access to multiple services with the same OIDC identity and I would like to utilize hydra as my OIDC provider to login to that application. Our users may have multiple tabs open attempting to access different service providers through our application. Ideally, all logins could succeed.

Based on some of the comments on the pr that enabled simultaneous logins for different clients, it seems like your team was open to a CSRF cookie change that would enable simultaneous logins for the same client in the same browser. We could attempt to work on this if you are still open to it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing pull request 3059 and the CSRF cookie and token handling involved in the reported two-tab reproduction. Reproduce simultaneous authentication flows for the same client, then verify that completing any tab no longer fails with a CSRF mismatch while existing flows remain protected.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
authentication, security
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.