Replies: 56 comments 69 replies
-
Same problem with Auth0 and VK providers. Looks like problem might be because of an Next.js update - that error doesn't happen for me on Next 13.3.0 |
Beta Was this translation helpful? Give feedback.
-
I have the same problem with Google and Github Providers. Opened a discussion about it ( #7403 ) but still nothing. I found something similar and tried to use the solution that was found there ( #6898 ) but it wasn't working. Even downgraded to 13.2.4: nothing. |
Beta Was this translation helpful? Give feedback.
-
I have the same issue with Google provider with Firebase. I am using Tried to define cookies with |
Beta Was this translation helpful? Give feedback.
-
Had this exact same error recently in production. We have a brokered login in out auth solution, and found many of these errors in the logs:
I could reproduce the problem in windows + latest Edge by the following steps:
|
Beta Was this translation helpful? Give feedback.
-
Had this problem with Auth0. what tripped me up is I specify the callback in the signIn method, but that doesn't redirect properly. |
Beta Was this translation helpful? Give feedback.
-
Had this exact same error recently in production. I'm not able to reproduce the problem, but I am experiencing a concerning error rate in production. Therefore I'm not actually sure this error is causing real problems.
|
Beta Was this translation helpful? Give feedback.
-
Same error here with the Discord provider. All works fine on localhost but see the problem when deployed to vercel. Tried the redirect callback but no change. |
Beta Was this translation helpful? Give feedback.
-
I've spent hours solving this issue with Next-Auth 4.22.1. Didn't work on either localhost or pm2. Eventually upgraded from Next 13.2.4 to 13.4.4 and that solved it on both local and remote servers. |
Beta Was this translation helpful? Give feedback.
-
An app with Next 13.4.2 and Next-Auth 4.22.1, deployed on Google App Engine, had this issue when using the Google provider. In "Authorized redirect URIs" I had "https://www.example.com/api/auth/callback/google", but after adding "https://example.com/api/auth/callback/google" this issue was resolved. |
Beta Was this translation helpful? Give feedback.
-
I am having too the same problem using Next 12.1.6 with In our config we use
Even when the |
Beta Was this translation helpful? Give feedback.
-
We observe this error frequently in prod. |
Beta Was this translation helpful? Give feedback.
-
Had same problem with this on "next": "^13.4.5-canary.6", when I was using localhost it was Ok, after deploying it on vercel i recieve this error after login attemp |
Beta Was this translation helpful? Give feedback.
-
Having the same issue after upgrading to 1.20 from 1.15. Anyone from next auth understand whats changed between these versions? |
Beta Was this translation helpful? Give feedback.
-
One thing that can also cause this error is if your environment variable |
Beta Was this translation helpful? Give feedback.
-
My steps:
|
Beta Was this translation helpful? Give feedback.
-
Any proper answer yet? still stuck here |
Beta Was this translation helpful? Give feedback.
-
Also facing the same issue with AzureADProvider in Edge |
Beta Was this translation helpful? Give feedback.
-
I am also having the same issue with any provider (github or google). Here are the code and logs
|
Beta Was this translation helpful? Give feedback.
-
Same problem with KeycloakProvider. Only happens on Netlify server, works perfectly locally. "next": "^13.4.1", |
Beta Was this translation helpful? Give feedback.
-
Using 127.0.0.1 instead of localhost worked for me. PS: This issue only occurred during development cycle. |
Beta Was this translation helpful? Give feedback.
-
I get this error when the link expired, (I copy the link then re-using it). Just get the new link by calling signIn("azure-ad") |
Beta Was this translation helpful? Give feedback.
-
I still struggle with this problem with GoogleProvider on staging environtment. |
Beta Was this translation helpful? Give feedback.
-
It worked for me just adding
|
Beta Was this translation helpful? Give feedback.
-
I try all of the above but without any good result. Any help would be appreciated `import { randomUUID } from "crypto"; const myAuthoriry: OAuthConfig = { const options: AuthOptions = {
} const handler = NextAuth(options); export { handler as GET, handler as POST };` |
Beta Was this translation helpful? Give feedback.
-
For me the problem was solved redirecting for the right domain, so in my case: NEXTAUTH_URL = temp-domain.com -> domain.com I was trying to log in to the LinkedIn provider via domain.com, when in fact the nextauth environment was set to temp-domain.com |
Beta Was this translation helpful? Give feedback.
-
I had this error running locally and what helped me resolve my issue was to set the correct callback URL These are referenced in the docs: |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Hi everyone, hope my answer will help to everyone. We work with Keycloak. Our config looks like this:
So why I added cookies to config? In this case we do not need to turn off 'checks' in config. We also do redirect from nextauth signin page to our custom signin page with nice design. |
Beta Was this translation helpful? Give feedback.
-
To me, fixing the DNS addresses of the network solved the issue. I was using the following: 1.1.1.1, 8.8.4.4. After hours of trying to resolve it, I decided to change the DNS to: 8.8.8.8 and 8.8.4.4, and finally it worked. Maybe because I was using Cloudflare and Google as DNS. |
Beta Was this translation helpful? Give feedback.
-
I just found that this issue happens when I use |
Beta Was this translation helpful? Give feedback.
-
Question 💬
Using AzureAdProvider for authentication
I have tried giving authorization params as well
Getting the error
How to reproduce ☕️
To reproduce use the above authOptions for azure ad, and use it in pages/api/auth/[...nextauth].ts file as specified in the docs.
Contributing 🙌🏽
Yes, I am willing to help answer this question in a PR
Beta Was this translation helpful? Give feedback.
All reactions