Closed Gyurmatag closed 1 year ago
same issue with credentials provider and typescript nextjs 13.4
From the issue description, sounds like …
needs to be ...
. Cannot say more without a reproduction.
Omg. That was the problem. Thank you @balazsorban44! Please consider this dot situation, because it is easy to miss!
unfortunately it's not something we can do about in NextAuth.js, it's how Next.js catch-all routes work. We could maybe add a warning though. Will let the Next.js team know. 👍
worked for me , thanks @balazsorban44
wow. I'll always copy paste it for now on...
Faced the same issue. Just check the folder name. It should be named as /[...nextauth]/
I might have been looking at my code for too long but can someone break this down to me like I'm 5? Do we keep the route.ts file inside the [...nextauth] folder? Should the folder be [. . .nextauth]/route.ts or [. . .nextauth].ts or [...nextauth] etc?
I've tried a few of these options and still get the same error mentioned above.
I was learning how to migrate from /pages to /app from this great guide: https://codevoweb.com/setup-and-use-nextauth-in-nextjs-13-app-directory/#comments @evanrosa I hope that guide can give you more clarity
Just don't copy the "…" character literally out of the line of the guide like I did finding myself here for a fix.
Guys, I apologize for the issue with the three dots. When I initially created the article, I copied the relative path to the route.ts
file from VS Code and pasted it directly into the article. Unfortunately, I was unaware that the appearance of the three dots changed unexpectedly during the process.
However, I have now manually typed the three dots in the article, conducted thorough testing, and everything seems to be working correctly. I am confident that no one will encounter the three dots issue again.
@wpcodevo I just found myself here as well due to copy / pasting There is a section that still has the ellipses instead of three dots
@ContrerasA Thank you for bringing this three dots issue to my attention. I've investigated the matter and noticed that WordPress automatically converts the three dots into ellipses, despite my previous effort to accurately represent them as real three dots by typing them. Nevertheless, I've added a warning note above the URL path, cautioning people to retype the three dots if they choose to copy and paste it.
worked mine was Auth instead of auth
@mesuhailpm Thanks for sharing that. I made the same error and couldn't figure out what the heck I was doing wrong.
@balazsorban44 you saved my day !
mv \[…nextauth\] \[...nextauth\]
solves the problem, for those who copy/pasted the folder structure from the web
i also got stuck here as getting the same error as the time i was getting the error the directory was
api/auth/[...nextAuth]
and i tried everything like making spaces between the dots but it didn't work and then finally i renamed the route as api/auth/[...nextauth]
i dont know the exact reason but worked for me.
Question 💬
I'm using the app dir, here is my route.js located:
app/api/auth/[…nextauth]/route.js
And here is the content of the route.js:But when I navigate to signIn page I've got this error:
What can be the problem here?
Thank you for your help!
How to reproduce ☕️
No reproduction in live environment.
Contributing 🙌🏽
Yes, I am willing to help answer this question in a PR