I recently launched my new NextJs blog application at on Vercel, but I'm encountering some issues with getting auth0 to function properly. Upon clicking the login button located in the top right corner of the screen, users are redirected to auth0 to complete the authentication process.
Upon returning to my app after successful authentication, I am facing an error (missing checks.state argument) and I am struggling to identify the source of this issue.
You can view the error here.
While investigating, I stumbled upon this article that discusses a chrome update in 2020 related to the sameSite attribute. It appears that this might be causing the problem as I am receiving warnings in my console.
You can see the sameSite attribute errors here.
I am curious if there are any configuration settings that I might have overlooked in my login handler.
import { handleAuth, handleLogin } from '@auth0/nextjs-auth0';
export default handleAuth({
async login(req, res) {
try {
await handleLogin(req, res, {
authorizationParams: {
audience: `http://localhost:5000/`, // or AUTH0_AUDIENCE
// Add the `offline_access` scope to also get a Refresh Token
scope: 'openid profile email create:category delete:category update:category create:post update:post delete:post create:comment delete:comment', // or AUTH0_SCOPE
response_type: "code"
},
});
} catch (error) {
res.status(error.status || 400).end(error.message);
}
}
});
It's possible that I may be missing something blatantly obvious in my setup.