Error: HTTP POST is not supported for /api/auth/callback/credentials #2664
Answered
by
balazsorban44
callumok2004
asked this question in
Help
-
Beta Was this translation helpful? Give feedback.
Answered by
balazsorban44
Sep 5, 2021
Replies: 1 comment 3 replies
-
Me neither on first look, but generally you don't need to fetch as you do on line 13 if you have an API route. try extracting your logic and import the actual method for handling the login process. UPDATE: An idea. 💡. I think relative paths for fetch in the backend is not supported. Try prepending your url with |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
callumok2004
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Me neither on first look, but generally you don't need to fetch as you do on line 13 if you have an API route. try extracting your logic and import the actual method for handling the login process.
UPDATE: An idea. 💡. I think relative paths for fetch in the backend is not supported. Try prepending your url with
http://localhost:3000
(or better yet, import the login logic as I suggested above)