Next-Auth + Twitch. Social log in issues
Unanswered
Weevil parasitoid posted this in #help-forum
Weevil parasitoidOP
Hello people, I need to fix my app's auth. For some reason it doesn't work knowing that I have everything correct connecting twitch auth provider, but once I want to log in I get this message:
2 Replies
Weevil parasitoidOP
[next-auth][debug][CREATE_STATE] { value: 'XTV1KfLe48_seFFu56oZThHPVV1F2qqWFnfIFEaEF24', maxAge: 900 }
[next-auth][debug][GET_AUTHORIZATION_URL] {
url: 'https://id.twitch.tv/oauth2/authorize?client_id=yfk403uilc7le77uar4vc4dypffwtr&scope=openid%20user%3Aread%3Aemail&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fapi%2Fauth%2Fcallback%2Ftwitch&claims=%7B%22id_token%22%3A%7B%22email%22%3Anull%2C%22picture%22%3Anull%2C%22preferred_username%22%3Anull%7D%7D&state=XTV1KfLe48_seFFu56oZThHPVV1F2qqWFnfIFEaEF24',
cookies: [
{
name: 'next-auth.state',
value: 'eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..hZZMn8-y2D3HnolH.zZwYuD30rss6xqLHFRbTiMNPI5Dh2M5rRVWHVlnqFScjtD1mbRrayK_Mt47ltF388eRQfazGdoJj9vT8HIlStxiF8FN_u73L0iApuM_RDv8515M5rav_oUEvl_XLp0yBU_7O9SLkE2Yeo42fwONzWD6c5mK7Mr1oVTzZ5JoPfmRvSiyDobw.ZnaHZt6FBg8HIxL3GInOsQ',
options: [Object]
}
],
provider: {
wellKnown: 'https://id.twitch.tv/oauth2/.well-known/openid-configuration',
id: 'twitch',
name: 'Twitch',
type: 'oauth',
authorization: { params: [Object] },
idToken: true,
profile: [Function: profile],
style: {
logo: '/twitch.svg',
logoDark: '/twitch-dark.svg',
bg: '#fff',
text: '#65459B',
bgDark: '#65459B',
textDark: '#fff'
},
checks: [ 'state' ],
clientId: 'yfk403uilc7le77uar4vc4dypffwtr',
clientSecret: '3dljp1pka02tp5y6ba2irwuy948gu4',
signinUrl: 'http://localhost:3000/api/auth/signin/twitch',
callbackUrl: 'http://localhost:3000/api/auth/callback/twitch'
}
}Followed by this error:
⨯ TypeError: Response body object should not be disturbed or locked
at extractBody (node:internal/deps/undici/undici:6342:17)
at new Request (node:internal/deps/undici/undici:7216:48)
at new NextRequest (C:\Users\augus\OneDrive\Desktop\tw_project\node_modules\next\dist\server\web\spec-extension\request.js:33:14)
at NextRequestAdapter.fromNodeNextRequest (C:\Users\augus\OneDrive\Desktop\tw_project\node_modules\next\dist\server\web\spec-extension\adapters\next-request.js:75:16)
at NextRequestAdapter.fromBaseNextRequest (C:\Users\augus\OneDrive\Desktop\tw_project\node_modules\next\dist\server\web\spec-extension\adapters\next-request.js:51:35)
at doRender (C:\Users\augus\OneDrive\Desktop\tw_project\node_modules\next\dist\server\base-server.js:1215:69)
at cacheEntry.responseCache.get.incrementalCache.incrementalCache (C:\Users\augus\OneDrive\Desktop\tw_project\node_modules\next\dist\server\base-server.js:1442:34)
at C:\Users\augus\OneDrive\Desktop\tw_project\node_modules\next\dist\server\response-cache\index.js:102:42
at ResponseCache.get (C:\Users\augus\OneDrive\Desktop\tw_project\node_modules\next\dist\server\response-cache\index.js:156:11)
at DevServer.renderToResponseWithComponentsImpl (C:\Users\augus\OneDrive\Desktop\tw_project\node_modules\next\dist\server\base-server.js:1360:53)
at C:\Users\augus\OneDrive\Desktop\tw_project\node_modules\next\dist\server\base-server.js:902:121
at NextTracerImpl.trace (C:\Users\augus\OneDrive\Desktop\tw_project\node_modules\next\dist\server\lib\trace\tracer.js:90:20)
at DevServer.renderToResponseWithComponents (C:\Users\augus\OneDrive\Desktop\tw_project\node_modules\next\dist\server\base-server.js:902:41)
at DevServer.renderPageComponent
...