简体   繁体   English

尝试登录部署在heroku上的应用程序时,auth0回调时出现404

[英]404 on auth0 callback when trying to login on app deployed on heroku

I have a PERN stack app using auth0 for login that is working fine on localhost but when deployed to heroku after I click to sign in I get a 404 on the callback.我有一个使用 auth0 登录的 PRN 堆栈应用程序,该应用程序在 localhost 上运行良好,但是当我单击登录后部署到 heroku 时,我在回调中收到 404。

The URL is exactly the same except for appname instead of localhost on all routes, i have also the env variables and callback and logout urls setup in auth0 correctly.除了所有路由上的 appname 而不是 localhost 之外,URL 完全相同,我还在 auth0 中正确设置了 env 变量以及回调和注销 url。

Is there anyone who has run into this and can help me solve this problem?有没有人遇到过这个问题可以帮我解决这个问题? Thanks.谢谢。

check your port.检查你的端口。 I thought my port was 3000 (I'm using Next.js on Heroku with Auth0), but it actually isn't running on 3000, but whatever Heroku decides.以为我的端口是 3000(我在 Heroku 上使用 Next.js 和 Auth0),但它实际上并没有在 3000 上运行,但无论 Heroku 决定如何。 I changed my auth0 Allowed Callback URLs and all is working!我更改了我的 auth0 Allowed Callback URLs ,一切正常!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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