Auth0 Home Blog Docs

Lock redirects twice



I’m using Auth0 Lock v10 with Angular 4. After logged in, I’m navigating to a route that is meant for authenticated users only. The problem is after logging in and redirecting to the route i specified, it again redirects to the redirect URL I specified in the auth0 config options.

Can you please tell us why is this happening? or how can I disable this?


The described behavior seems highly specific to how you implemented your client application and how the authentication part was integrated to it. For example, if you have guards in place that redirect non-authenticated users to the login page the behavior could be explained by those guards incorrectly treating an already authenticated user as not authenticated and still performing the redirect.

In order to diagnose the root cause a small sample application that reproduces the issue would be ideal, otherwise, other people can only make guesses unless they already experienced the same exact behavior before which is not my case. You should create or point to a sample application that exhibits this issue.