Redirection from external URL routes to unexpected Landing page

Any ideas appreciated on how to handle the following scenario.

On my app:
User logs in using Auth0
User navigates to Settings page
User clicks connect to an external app for OAuth
User is directed to the external app Auth page
User Authorizes the connection in the external app
User is briefly redirected back to the Settings page (expected redirect_uri)

And

Immediately User is redirected back to my landing page.

I can’t figure out how to stop the last redirection to the landing page.

I am using auth0-angular and localstorage as cache location.

Hi,
Try adding “appState: { target: “/url” }” as an argument in your call to “loginWithRedirect”…this should Angular recognizes the intended route and doesn’t automatically redirect you back

Thank you for your response! While it was not the solution it sent me in the right direction.

Solution was to mention the following line in Auth0 config.
skipRedirectCallback: window.location.pathname === ‘/account/settings’,

It turns out skipRedirectCallback also accepts comparison expression, something so small but easy to overlook.

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