First time creating an auth0 web app and I have an "Invalid_request" error

This is the error that I have:

invalid_request: You may have pressed the back button, refreshed during login, opened too many login dialogs, or there is some issue with cookies, since we couldn't find your session. Try logging in again from the application and if the problem persists please contact the administrator.

I’m justing following this tutorial to create the app with Hasura:

and then I test the app using the url:

dev-98h51dru.auth0.com/login?client=675t6OrA7wAOR78QERufhgXhURY9s9Ke&protocol=oauth2&response_type=token%20id_token&redirect_uri=http://localhost:3000/callback&scope=openid%20profile

and I get the error…

How can I solve it? Or is a temporal error from auth0?

Hi @MontoyaAndres,

Take a look at logs in your Auth0 dashboard. Let us know what they say (omitting sensitive data of course).

Thanks,
Dan

Hey @dan.woda the url to test the auth0 access, I got it from here: https://learn.hasura.io/graphql/hasura/authentication/5-test-with-headers and this is the url where I want to log in https://dev-7uxsep-u.auth0.com/login?client=zG8heoq1x9BYrD681lgoEZ28IhE1WA1y&protocol=oauth2&response_type=token%20id_token&redirect_uri=callback_uri&scope=openid%20profile this sends me to the login page with an error, which is:

{
  "date": "2020-01-18T04:10:12.118Z",
  "type": "w",
  "description": "A user has attempted to access a login page directly. This is not supported unless a \"Application Login URI\" is set for your application, or a \"Tenant Login URI\" is set for your tenant. For more information, see: https://auth0.com/docs/universal-login/default-login-url",
  "connection_id": "",
  "ip": "186.84.89.253",
  "user_agent": "Chrome 79.0.3945 / Linux 0.0.0",
  "hostname": "dev-7uxsep-u.auth0.com",
  "tracking_id": "b3f404b885a486623fe2",
  "user_id": "",
  "user_name": "",
  "log_id": "90020200118041015760008413190248087431105153689110708338",
  "_id": "90020200118041015760008413190248087431105153689110708338",
  "isMobile": false
}

Why is that? In the hasura link that I named works perfectly…

Thanks for posting the log.

This error is describing a situation where you are trying to login directly through the auth0 URL and not a login coming from your application. You will either need to login through your application or setup the default login route described here:

Hope this helps!
Dan

1 Like

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