Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
liwenz opened this issue Jan 25, 2024 · 11 comments
Open

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

liwenz opened this issue Jan 25, 2024 · 11 comments

Comments

@liwenz
Copy link

liwenz commented Jan 25, 2024

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
Copy link
Author

liwenz commented Jan 25, 2024

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 liwenz changed the title chapter 15 : how to set AUTH_SECRET and url Jan 25, 2024
@liwenz
Copy link
Author

liwenz commented Jan 26, 2024

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
Copy link
Author

liwenz commented Jan 26, 2024

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

@Ivan1Vasilyev
Copy link

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

@biznezzit
Copy link

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/

@delbaoliveira
Copy link
Collaborator

@liwenz interesting 🤔 are you still experiencing this issue?

@amirrahemi01
Copy link

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 ()

@markosmk
Copy link

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

@AnmoldeepSingh-Sandhu
Copy link

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.

@wayneGlfls
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
9 participants