Using auth0-react with custom domain redirects app to /authorize instead of login

Hi, I am using auth/react (version 1.1.0) library and everything is working fine until I switch to custom domain.
When I change <Auth0Provider prop domain to my own custom domain , the application gets redirected to authorize?scope=openid%20profile%20email%20re… instead of login page

When I switch back to default auth0 domain everything works just fine.

 <Auth0Provider
          domain={process.env.REACT_APP_AUTH0_DOMAIN!}
          clientId={process.env.REACT_APP_AUTH0_CLIENT_ID!}
          redirectUri={window.location.origin}
          useRefreshTokens={true}
          scope="read:current_user update:current_user_metadata profile email openid "
        >
       ... rest of the components

Hello @VodaVDzbane - welcome to the Auth0 Community!

The /authorize endpoint is the one intended for login. If you are redirected to /authorize?scope=... instead of yourcustom.doma.in/authorize?scope=..., it could mean that you are not correctly declaring the variable.

I would suggest using your actual domain instead of a variable and seeing if the problem persists.

Could you give that a shot?

Thanks!