Testing OAuth2 in preview
Answered
Evanion posted this in #help-forum
EvanionOP
I'm working on adding authentication via
My question is... is there any way, I can disable the preview environments vercel authentication, so that my auth provider can call my callback function?
next-auth to my app. Now, since the provider needs to send a post to the requesting party, I can't run it on localhost, and I can't test it on preview either due to the authentication layer of vercel.My question is... is there any way, I can disable the preview environments vercel authentication, so that my auth provider can call my callback function?
Answered by Evanion
Solved it, I had registered the incorrect redirect uri in discord.
For future issues if you are using
the URI should be:
and it works with localhost if you add the correct path.
For future issues if you are using
next-auth:the URI should be:
https://<yoursite>/api/auth/callback/<providerId>and it works with localhost if you add the correct path.
1 Reply
EvanionOP
Solved it, I had registered the incorrect redirect uri in discord.
For future issues if you are using
the URI should be:
and it works with localhost if you add the correct path.
For future issues if you are using
next-auth:the URI should be:
https://<yoursite>/api/auth/callback/<providerId>and it works with localhost if you add the correct path.
Answer