Next.js Discord

Discord Forum

NextAuth SignIn oauth error

Answered
strikx posted this in #help-forum
Open in Discord
Hi, I asked AI and tried everything but still gets an error about options.encoding

[next-auth][error][SIGNIN_OAUTH_ERROR] 
https://next-auth.js.org/errors#signin_oauth_error The "options.encoding" property must be of type string. Received undefined {
  error: {
    message: "The \"options.encoding\" property must be of type string. Received undefined",
    stack: "TypeError: The \"options.encoding\" property must be of type string. Received undefined\n    at setAAD (native)\n    at <anonymous> (node:crypto:505:32)\n    at <anonymous> (/app/.next/server/app/api/auth/[...nextauth]/route.js:13:9736)\n    at <anonymous> (/app/.next/server/app/api/auth/[...nextauth]/route.js:13:9840)\n    at <anonymous> (/app/.next/server/app/api/auth/[...nextauth]/route.js:9:18113)\n    at processTicksAndRejections (native)",
    name: "TypeError",
  },
  providerId: "discord",
  message: "The \"options.encoding\" property must be of type string. Received undefined",
}


Maybe some of you will know what is this. This happens only on production build
Answered by Hilsa shad
fyi the issue seems to be fixed in v5 which is currently in beta
View full answer

4 Replies