Failed Silent Auth : login failed error while try to do silent authentication for API

I am trying to call getTokenSilently$ using HTML intercept and get token in responses before making actual call to my APIs. Calling I am initiating from Angular APP and API is in Node.

When checked logs in auth0 it says ‘failed silen auth’

not sure where I am making mistake. Could you please help its urgent?

Logs as attached
auth0.txt (2.7 KB)

Thanks,
Denish

Hi Denish,

In the log file you shared you can see the login_required error returned. This is a normal error that occurs when the user is not logged in with Auth0.

Silent authentication works by making a request to Auth0 in the background. If the user has logged in previously, Auth0 will use their session to issue a new token without prompting the user to enter their credentials.

The session expires after a certain period of inactivity (meaning no interaction with Auth0) as well as after a certain time period regardless of activity. You can configure the expiry times with the Inactivity timeout and Require login after settings respectively as explained here: Configure Session Lifetime Settings

You should handle the login_required (and other error responses) by redirecting the user to the universal login page without prompt=none in the URL parameters.

Please read through the following article. It will help you understand the error responses from silent authentication in more detail: Configure Silent Authentication

Hi Richard, we have this same problem. Our session settings are very long, (100 days for inactivity, 365 days to require a new login). Regarding your suggestion: By redirecting the user to the universal login page and sending them to a URL with a parameter that does not contain ‘prompt=none’ seems to defeat the purpose of a ‘Silent Auth’ does it not? Is there anything else that can be done? We are getting 1000+ ‘Failed Silent Auth’ events every few seconds.
Ryan