When i click login button my browser hits https://undefined/authorize

Hi,

I followed the instructions for the create-react-app tutorial here

I’m using Zeit Now (serverless) to setup my project but here’s the interesting part. On my localhost (now dev) i can login properly and it redirects to the correct domain but when I deploy to my now.sh domain the domain in the url path is undefined so I can never reach the login modal page. Pls advise here I’m stressing heavy on this haha.

Hi @freshlybreemed,

Welcome to the Auth0 Community Forum! Hopefully we can alleviate some of that stress :sweat:

It sounds like your configured domain is not being passed correctly. Can you post some info or examples of how you are configuring the auth0 in your project? Where are your env variables coming from. Please scrub of any sensitive data (tenant names, client id, secrets, etc.).

Thanks,
Dan

@dan.woda in my index.js file i have…`

ReactDOM.render( <Auth0Provider domain={process.env.REACT_APP_DOMAIN} client_id={process.env.REACT_APP_CLIENTID} redirect_uri={window.location.origin} onRedirectCallback={onRedirectCallback} >

i followed the tutorial and it seems like the only place it asks for my domain. its just weird that it works on my localhost when i’m running on dev

can you do a console log on the serverless setup to confirm that you are in fact able to get the env variables. I have seen something similar happen when users try to deploy and the env variables need configured in a different way for that platform.

Have you looked at this:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.