next-learn icon indicating copy to clipboard operation
next-learn copied to clipboard

chapter 15 : how to set AUTH_SECRET and url on vercel.app

Open liwenz opened this issue 1 year ago • 12 comments

the chapter 15 has no mid check point. I finish and check it. on http://localhost:3000/dashboard it works well, Bu;t I publish and test on https://nextjs-dashboard2-plum.vercel.app/login it can't login In my pc, I set AUTH_SECRET and url how to do on vercel.app

liwenz avatar Jan 25 '24 04:01 liwenz

https://vercel.com/docs/projects/environment-variables#preview-environment-variables says: Changes to Environment Variables are not applied to previous deployments, they only apply to new deployments.

liwenz avatar Jan 25 '24 04:01 liwenz

chapter 15 let's go vercel with https://vercel.com/docs/projects/environment-variables do I set auth_secret enough? I think we need a public key and private key Is there any tutorial about it?

liwenz avatar Jan 26 '24 03:01 liwenz

Screenshot 2024-01-25 231220 I add AUTH_SECRET , but when login ,it's 404

liwenz avatar Jan 26 '24 04:01 liwenz

I have the same problem. I added AUTH_SECRET to the progect in versel.app, but i still can't login in deployment. https://vercel.com/ivans-projects-9f0ecf4e/next-example https://next-example-ivans-projects-9f0ecf4e.vercel.app

image

Ivan1Vasilyev avatar Mar 19 '24 16:03 Ivan1Vasilyev

I had the same issue which I solved somehow by editing AUTH_SECRET and redeploying the application a couple of times. Not a real solution., though... 🤔 In case, you'd like to double-check: https://next-dashboard-app-biznezzit.vercel.app/

biznezzit avatar Apr 01 '24 10:04 biznezzit

@liwenz interesting 🤔 are you still experiencing this issue?

delbaoliveira avatar May 02 '24 12:05 delbaoliveira

also I have problem with this auth, in local host works well but in vercel host I receive 405 error.

error: Failed to load resource: the server responded with a status of 405 ()

amirrahemi01 avatar May 12 '24 14:05 amirrahemi01

I had the same issue which I solved somehow by editing AUTH_SECRET and redeploying the application a couple of times. Not a real solution., though... 🤔 In case, you'd like to double-check: https://next-dashboard-app-biznezzit.vercel.app/

Hi @biznezzit I have the same error, could you fix it?, i get 405 status, i added AUTH_SECRET, and redeploy, but I still have the same mistake :(, same thing that happened to @amirrahemi01

markosmk avatar May 13 '24 03:05 markosmk

When you make changes to your environment variables, you need to redeploy your project because Vercel reads these variables only during the initial deployment. Any newly added environment variables won't be recognized by Vercel until you redeploy your project.

AnmoldeepSingh-Sandhu avatar May 21 '24 02:05 AnmoldeepSingh-Sandhu

https://github.com/orgs/vercel/discussions/6981

l-ollz avatar Jun 29 '24 02:06 l-ollz

When you make changes to your environment variables, you need to redeploy your project because Vercel reads these variables only during the initial deployment. Any newly added environment variables won't be recognized by Vercel until you redeploy your project.

I confirmed can login after redeploy my project, thanks heaps!

wayneGlfls avatar Jul 21 '24 04:07 wayneGlfls