简体   繁体   中英

Auth0 how can i deploy my next.js application to Vercel

This is my application deployed on Vercel: https://budgetinator.vercel.app/

Whenever i click on the login button error 500 internal server error occurs.

This in the.env.local of my application

AUTH0_BASE_URL='http://localhost:3000'
AUTH0_ISSUER_BASE_URL='https://dev-wyibmj01.us.auth0.com'

Now using localhost:3000 is works fine, but i want to deploy my application.

I also already changed the url's on auth0 dashboard:

在此处输入图像描述

However, it still cant really connect. What do i need to do?

You need to push up a.env.production file with these values matching to the environment variables you have in Vercel. It should not contain any sensitive information because it's being pushed to your repo!

AUTH0_SECRET=${AUTH0_SECRET}
AUTH0_BASE_URL=${AUTH0_BASE_URL}
AUTH0_ISSUER_BASE_URL='https://precisionproco-dev.eu.auth0.com'
AUTH0_CLIENT_ID=${AUTH0_CLIENT_ID}
AUTH0_CLIENT_SECRET=${AUTH0_CLIENT_SECRET}

I'm having the issue of the login page showing up, however, on the Vercel live site, it doesnt re-direct to the home page, i get a blank page with a 400 error. It works fine on localhost and redirects back, but doesnt on the Vercel site.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM