getAccessTokenSilently throws error login required

I am using latest auth0-react lib. After user logs in using universal login and database connection, getAccessTokenSilently, this trows error Login required. Everything works in chrome incognito mode. Same errors is Safari, Safari incognito mode. Seems to be related to cookies being blocked. It might be solved by using custom domain, are the solution for default auth0 domains? + Login Required seems to be confusing message in this case.

1 Like

Did you get any responses? I am facing similar problem.

I am having the same issue. getAccessTokenSilently works in chrome and firefox

It seems like the others on this thread are having configuration issues. For anyone who is like me and winding up here to figure out what is going on with this error, I wanted to share what I found:

  1. Both login_required and consent_required are legitimate opened responses. They seem to arise out of inactivity timeouts and needing more permissions respectively. (more info here:
  2. As such, when you use getAccessTokenSilently, you pretty much always need to wrap it in a try...catch and look for these errors, a la:
    try {
      token = await getAccessTokenSilently();
    } catch (e) {
      if (e.error === 'login_required') {
      if (e.error === 'consent_required') {
      throw e;

The quick start doesn’t really make mention of this, but it is in an example in the auth0-react repo, here: Code lifted from

Hopefully, this helps someone who is chasing their tail.