Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple authenticate requests from the same session causes state mismatch #639

Closed
mrviniciux opened this issue Nov 28, 2023 · 1 comment
Labels

Comments

@mrviniciux
Copy link

mrviniciux commented Nov 28, 2023

Describe the bug

Opening authentication in two different tabs result on state mismatch causing some libraries that use node-openid-client to throw an error to the user.

To Reproduce

Same steps as described here: #154

Expected behaviour
A common user can easily open multiple tabs of an application and choose a random one after to login. But instead of having a successful login, an error is returned.

Environment:

  • openid-client version: [e.g. v5.6.1]
  • node version: [e.g. v20.9.0]

Additional context

This issue is also related on next-auth projects:

nextauthjs/next-auth#7894

In the issue above I posted some logs from next-auth.

Something similar also happened here: nextauthjs/next-auth#3022

@panva
Copy link
Owner

panva commented Nov 28, 2023

Unsurprisingly, just like in the aforementioned #154, there's nothing much to do. The passport strategy is meant to remain simple, not dealing with edge cases.

As far as next-auth, or other pieces of work that utilize openid-client, they can orchestrate the state v session management however complex they can afford since the core library is not responsible for maintaining the user-agent state and its state in any way.

@panva panva closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2023
@panva panva added wontfix and removed triage labels Nov 28, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants