The redirects uses the default environment URL or need setting it? #2459
Replies: 9 comments 7 replies
-
You probably forgot to set the |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
It looks like it's not being picked up for some reason. Try to log the value server-side. Also, unless you deployed the site on a subpath, the |
Beta Was this translation helpful? Give feedback.
-
I tried alread, but no success. |
Beta Was this translation helpful? Give feedback.
-
The repository need upload any .env file? |
Beta Was this translation helpful? Give feedback.
-
I'm using next 11 and, the next auth config is error page is be login, but redirects to error page, why? |
Beta Was this translation helpful? Give feedback.
-
Really hard to say. Do you have a reproduction? This is certainly not a problem in .env is not necessary. Read more about environment variables here https://nextjs.org/docs/basic-features/environment-variables |
Beta Was this translation helpful? Give feedback.
-
@balazsorban44 I’m having an identical issue after deploying to Amplify. The same app runs on Vercel and Heroku fine. The environment variable is set in Amplify, and the URL is canonical. Im trying to debug it at the moment, but was interested to find someone else here with the same issue. |
Beta Was this translation helpful? Give feedback.
-
After a bit of digging I've got this working. The issue is that Amplify environment variables are only present at build-time within Amplify, and the Committing a Another solution is to replace the
@IgorDePaula's solution is probably simpler for non-sensitive vars such as |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Question 💬
I push my app to aws amplify, I register, but on login, on got error the redirect action redirect me to localhost and not to provided url.
How to reproduce ☕️
https://develop.d1cwc8lbezfn59.amplifyapp.com/ -> my app
my auth config
Try you register and after do login.
(I'm using cognito, after register, the cognito will send a code for verification for your email, and you need send this code...after this you can login)
Contributing 🙌🏽
No, I am afraid I cannot help regarding this
Beta Was this translation helpful? Give feedback.
All reactions