New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: This action with HTTP GET is not supported by NextAuth.js #6045
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
@yuvrajmahalle what's your nextjs vertion? |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
when i sign in it redirect me to this url and then the error will be returned. |
i'm not in an organisztion proxy network. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Not sure, give it a try by upgrading your auth-next version to the latest. |
i tried that too. but it didn't fix it. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@balazsorban44 Could you please assist us? I've been stuck with this problem for three days now. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Should be fixed already on Here is a deployed version, using |
We cannot recreate the issue with the provided information. Please add a reproduction in order for us to be able to investigate. Why was this issue marked with the
|
I've created a small repo that has the same issue as described here. I removed all code that is not really necessary but still maintain a rather realistic app base. https://github.com/IceToast/next-auth-issue Repro Steps:
If there is anything you need, please let me know |
This comment was marked as off-topic.
This comment was marked as off-topic.
@IceToast so first of all, directly modifying the session token might have unforeseen consequences, https://github.com/IceToast/next-auth-issue/blob/9152da4aff2e02c16e6f28c9bf360e8ba83c6316/src/pages/api/auth/%5B...nextauth%5D.js#L128 like you totally ignore the prefixing for increased security:
(There is a reason that messing with the cookies and using the credentials provider with a database is not recommended.) The "minimal" reproduction was also very bloated, looks like you just linked to your full project. Keep in mind that it increases the time for triaging. Anyway, I created my own reproduction and could not find an issue: https://github.com/balazsorban44/next-auth-6045 Still waiting for a proper reproduction from anyone reporting here. Happy to look into it, if there is a reasonable reproduction to investigate. |
Thanks for looking into it. Yes i'm aware that messing with the session token does have its consequences, however it has nothing to do with what this bug is about.
The reproduction is indeed a copy of a project of mine with all not necessary code removed. I will gladly make it more minimalistic if you wish. I will edit this post when it's done. Edit: |
@balazsorban44 Have a nice weekend! |
I'm having a similar issue, so far half of the problem was caching cookies on vercel. When it comes to the second part, I'm still investigating it but the bug is on vercels production which doesn't give much debugging insights. |
Hi, #6132 (comment) could you test out this version to see if it fixes your issue? If it does, it will be included in the next release once the PR is merged! |
@balazsorban44 I confirm. I fixed the issue for me (upgraded from 4.18.6) |
@balazsorban44 I can also confirm that this fix works! |
New stable release will come out soon with this. Thanks for confirming. We will have to add proper fully covering tests at some point. 馃檭 |
Thanks for your time to investigate and fix! |
|
I have gotten this problem in V4.19.2 |
@JadYaghi make sure you typed the correct link I use "next-auth": "^4.20.1" and it works perfectly |
Im getting this error now, but only in production using next-auth 4.22.1 it happens with both my GoogleProvider and also when doing a custom credentials provider. But both work fine in dev but are breaking in production. Am using next 13 but have all my auth running through pages router and not app router. |
I'm facing the same issue. Using
Our project is still using pages directory |
I just came across this error. At first, I thought It was because my environment variables were not loaded since I forgot to add them in next.config.js file, but the error persisted. I checked the URL on which the error was and Immediately noticed that the URLs I provided in Google Cloud and in which my server was running on were not matching. I provided "http://localhost:3000" and my next.js server was running on "http://localhost:3001". After fixing that, everything worked fine.
|
Question 馃挰
Unable to authenticate my Next.js app with credentials. Error: This action with HTTP GET is not supported by NextAuth.js
As far as I know everything is correct according to the doc. and it was working too. it suddenly start returning this error.
[...nextauth].js is inside pages/api/auth
this is the url: http://localhost:3000/api/auth/callback/google/?state="" ....
How to reproduce 鈽曪笍
.
Contributing 馃檶馃徑
Yes, I am willing to help answer this question in a PR
The text was updated successfully, but these errors were encountered: