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

checks.state argument is missing #512

Closed
6 tasks done
maciekpaprocki opened this issue Oct 5, 2023 · 2 comments
Closed
6 tasks done

checks.state argument is missing #512

maciekpaprocki opened this issue Oct 5, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@maciekpaprocki
Copy link

Checklist

Description

Got quite a few of those errors happening in production. Weirdly, when i try to login every method works fine as well as I've seen bunch of people logging properly, so i think it's only affecting fraction of users.

i've seen #467 but that issue seems to be for very specific case, where I see small chance of my users actually ending up in this scenario. Not in those numbers ( happened 3-4 times for 12 registrations )

BadRequestError: checks.state argument is missing\n    at ResponseContext.callback (/var/app/current/node_modules/express-openid-connect/lib/context.js:354:15)\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)"

Is it a bug?
Any idea why is it happening? ( what user actions cause it )
How to deal with it?

  • How to catch it? Seems check if for message and BadRequestError? I understand BadRequestError can happen in a lot more cases than only this.
  • How to deal with it on UX side.

Reproduction

Pretty standard auth0 express backend app.

openidAuthConfig = {
    authRequired: false,
    auth0Logout: true,
    baseURL: DOMAIN,
    secret: AUTH0_SECRET,
    clientID: AUTH0_CLIENT_ID,
    issuerBaseURL: AUTH0_ISSUER_BASE_URL
}

Additional context

I can only find it in logs, I didn't experience it happening while I was testing so reproducing is pretty much game of numbers, or some particular emails or something like that.

express-openid-connect version

2.16

Express version

5

Node.js version

18

@maciekpaprocki maciekpaprocki added the bug Something isn't working label Oct 5, 2023
@adamjmcgrath
Copy link
Contributor

Hi @maciekpaprocki - thanks for raising this

Take a look at #145 (comment) and #267 (comment) for an explanation of the error and some tips on debugging.

How to catch it? Seems check if for message and BadRequestError? I understand BadRequestError can happen in a lot more cases than only this.
How to deal with it on UX side.

BadRequestError just means that the the client is making a bad request and the server can't log the user in. All you can do is prompt the user to try to login again (and also debug the underlying issue using the links I shared)

@adamjmcgrath
Copy link
Contributor

adamjmcgrath commented Oct 23, 2023

Closing due to inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants