We have an angular app hosted at the root of a domain, say:
example.com
We have a mvc.net api running at the /api virtual directory:
example.com/api
We have rewrite rules in our api's web.config to allow calls to /api, and this is working correctly because our xhr calls are working.
For authentication, we have to route the browser to example.com/api/auth/whatever so it can then appropriately 302 to an authentication provider. Once the user authenticates, they are routed back to our API, and then back to the angular application.
This all works without issue in development, because everything is technically in separate domains (locahost:4200, 4201, etc). Once it's deployed on the same domain, the angular router then starts intercepting the auth link clicks, and routing to the catch all route once no routes match.
I've tried adding target="_self" to the links, as I've seen others recommend, but that has not changed the behavior.
Is there a way to force angular to not process a route, or provide some guard that would intercept the route, and just let the browser handle it?