I am looking at the docs here - Default Auth0 Error Page
If your callback URL is valid, when an authorization error occurs, the Authorization Server returns the appropriate error and state parameters to your callback URL.
I have added a url to “Allowed Callback Urls” in my application settings, I have also tried both the Default/Custom Error page options in Tenant Settings.
I still receive a black error page when viewing an expired link. All other topics I have come across on the community board remain unresolved. I am working on an inherited implementation for a Next.js web app.
Hey @stellar !
I see the checks.state argument is missing error is occurring. I found some solved community posts that may be able to help you.
Hey All,
I find that every so often(not sure of the exact cadence for this error) I get the following error after the user is successfully authenticated(i.e. the url this is happening on is https://website.com/callback ):
BadRequestError: checks.state argument is missing:
at /var/www/app/html/node_modules/express-openid-connect/middleware/auth.js:94:29
at processTicksAndRejections (internal/process/task_queues.js:97:5)
I am using express-openid-connect v1.0.1 and the new Universal Login page.…
Please include the following information in your post:
Which SDK this is regarding: @auth0 /nextjs-auth0
SDK Version: 1.3.0
Platform Version: next: 10.1.3, Node: 15.13.0
Code Snippets/Error Messages/Supporting Details/Screenshots:
BadRequest: checks.state argument is missing after login
After successfully login in via Google or Github (as shown in auth0 logs):
[image]
The nextjs api callback function of the SDK receives the request (which contains query params: code, state & auth0: [ ‘…
opened 12:56PM - 09 Oct 20 UTC
closed 01:33PM - 07 Dec 20 UTC
<!--**Please do not report security vulnerabilities here**. The [Responsible Dis… closure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues.
**Thank you in advance for helping us to improve this library!** Please read through the template below and answer all relevant questions. Your additional work here is greatly appreciated and will help us respond as quickly as possible. For general support or usage questions, use the [Auth0 Community](https://community.auth0.com/) or [Auth0 Support](https://support.auth0.com/). Finally, to avoid duplicates, please search existing Issues before submitting one here.
By submitting an Issue to this repository, you agree to the terms within the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md).-->
### Description
Sometimes while testing this I get:
```
BadRequestError: checks.state argument is missing
at <folder>/node_modules/express-openid-connect/middleware/auth.js:105:31
at processTicksAndRejections (internal/process/task_queues.js:97:5)
```
This happens randomly after logging in.
### Reproduction
It happens especially often at the first login, but sometimes just randomly after logging in. My code:
```js
require('dotenv').config()
const express = require('express')
const app = express()
const { auth } = require('express-openid-connect')
const config = {
authRequired: false,
auth0Logout: true,
issuerBaseURL: process.env.ISSUER_BASE_URL,
baseURL: process.env.BASE_URL,
clientID: process.env.CLIENT_ID,
secret: process.env.SECRET,
}
app.use(auth(config))
app.get('/', (req, res) => {
res.send(req.oidc.isAuthenticated() ? 'Logged in. Welcome!' : 'Logged out. <a href="/login">Login?</a>')
})
app.listen(3000)
```
### Environment
- **Version of this library used:** 2.0.0
- **Version of the platform or framework used, if applicable:** Express version 4.17.1
- **Other relevant versions (language, server software, OS, browser):** Node.js version 12.18.4 installed with nvm, macOS 10.15.6, Chrome 85.0.4183.121
- **Other modules/plugins/libraries that might be involved:** dotenv version 8.2.0
I hope this helps!
Best,
Alex