Unable to have our angular application be a redirect target for other oauth services

I am using auth0-angular v1.3.1.

Our angular application and API is secured with Auth0. It works great.

Our application requires the use of other OAuth secured APIs by other vendors. So, I am having our angular application link to the other application, allowing the user to authorize our application and then redirecting back to our angular application with a code and state which is then sent to our API to exchange for an access token and refresh token which is stored in our backend.

The problem is, when you access ANY angular URL with a code & state query parameter, it fails to login and redirects to our default page. So, this has stopped me in my tracks implementing this.

Unless, I am completely misunderstanding on how my application could be a client to other OAuth secured applications.

1 Like

I am experiencing the same issue.
Is it possible for Auth0 to only search for ‘state’ and ‘code’ if the the callback is the path we define in our App?

Update
I was able to get around this issue by writing the pathname and search queries (window.location.search) to constants in the App Component constructor. Once isAuthenticated$ resolves to ‘true’ use an Angular router to navigate back to the correct URL.

this.router.navigate([pathname], { queryParams});