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

Bad Request: checks.state argument is missing #341

Closed
nheyland opened this issue Feb 24, 2022 · 2 comments
Closed

Bad Request: checks.state argument is missing #341

nheyland opened this issue Feb 24, 2022 · 2 comments
Labels
question Further information is requested

Comments

@nheyland
Copy link

Describe the problem

After writing a very simple app, like this:

app.use(
  auth({
    issuerBaseURL: process.env.ISSUER_BASE_URL,
    baseURL: process.env.BASE_URL,
    clientID: process.env.CLIENT_ID,
    secret: process.env.SECRET,
    idpLogout: true
  })
);

app.get("/", (req, res) => {
    res.send(req.oidc.isAuthenticated() ? "logged in" : "logged out");
});

I am immediately getting this message

BadRequestError: checks.state argument is missing
    at /Users/m1/dev/paperTours/test/aut/node_modules/express-openid-connect/middleware/auth.js:121:19
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

My allowed callback url is http://localhost:3000/callback
and my allowed logout url is http://localhost:3000

Ive tried this with and without caddy to handle the https issue

Ive tried on Chrome and Safari

I have no clue what to do now and I haven't seen anything recently reported on this issue.

@adamjmcgrath
Copy link
Contributor

Hi @nheyland - thanks for raising this

I can't see anything wrong with the code you've shared.

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

@adamjmcgrath adamjmcgrath added the question Further information is requested label Feb 25, 2022
@adamjmcgrath
Copy link
Contributor

Closing - feel free to ping me if you want to reopen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants