NextAuth OAUTH_CALLBACK_ERROR - checks.state argument is missing

Getting this stacktrace after logging in via google provider on nextauth, as soon as I get redirected. Weirdly enough I am logged in though but when trying to access token it's null, and if I refresh page i'm logged out again. What is this and how can I debug this?
6 Replies
Xaohs
XaohsOP2y ago
[next-auth][error][OAUTH_CALLBACK_ERROR]
2022-12-27T15:51:31: https://next-auth.js.org/errors#oauth_callb ack_error checks.state argument is missing {
2022-12-27T15:51:31: error: TypeError: checks.state argument i s missing
2022-12-27T15:51:31: at Client.callback (/home/*****/node_modules/openid-client/lib/client.js:387:13)
2022-12-27T15:51:31: at oAuthCallback (/home/****/node_modules/next-auth/core/lib/oauth/callback.js:127:29) at async Object.apiResolver
2022-12-27T15:51:31: at async NextNodeServer.runApi (/home /***/node_modules/next/dist/server/next-server.js:481:9)
2022-12-27T15:51:31: at async Object.fn (/home/****/node_modules/next/dist/server/next-server.js:741:37) {
2022-12-27T15:51:31: name: 'OAuthCallbackError',
2022-12-27T15:51:31: code: undefined
2022-12-27T15:51:31: },
2022-12-27T15:51:31: providerId: 'google',
2022-12-27T15:51:31: message: 'checks.state argument is missin g'
2022-12-27T15:51:31: }
[next-auth][error][OAUTH_CALLBACK_ERROR]
2022-12-27T15:51:31: https://next-auth.js.org/errors#oauth_callb ack_error checks.state argument is missing {
2022-12-27T15:51:31: error: TypeError: checks.state argument i s missing
2022-12-27T15:51:31: at Client.callback (/home/*****/node_modules/openid-client/lib/client.js:387:13)
2022-12-27T15:51:31: at oAuthCallback (/home/****/node_modules/next-auth/core/lib/oauth/callback.js:127:29) at async Object.apiResolver
2022-12-27T15:51:31: at async NextNodeServer.runApi (/home /***/node_modules/next/dist/server/next-server.js:481:9)
2022-12-27T15:51:31: at async Object.fn (/home/****/node_modules/next/dist/server/next-server.js:741:37) {
2022-12-27T15:51:31: name: 'OAuthCallbackError',
2022-12-27T15:51:31: code: undefined
2022-12-27T15:51:31: },
2022-12-27T15:51:31: providerId: 'google',
2022-12-27T15:51:31: message: 'checks.state argument is missin g'
2022-12-27T15:51:31: }
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Xaohs
XaohsOP2y ago
Nope I switched to session strategy since I couldnt fix this issue withg jwt
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Xaohs
XaohsOP2y ago
Yeah same tbh, nobody replied to this thing and I was like "I can't be the only one right...?" The weird part about it is, it happens on very specific browsers for some reason On my google chrome it works, on firefox it doesnt, tried clearing cookies on both. On anohter PC it's the exact opposite, it works on firefox but not chrome And I have no clue how to even start debugging this, as it seems like an internal issue in the module itself
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server