I have 2 applications (one .NET and the other Angular SPA (web services in .NET) with the same domain name. I need to enable SSO for these 2 applications. Both web.config files have the same machine key and they enabled for form validation mode.
I enter the .NET site, present the Angular site in iFrame. When an iframe is opened, the API call includes the cookie.ASPXAUTH in the request header, but HttpContext.User.Identity.Authenticated is set to false. Thus, it returns 404 and redirects to the login page for the Angular site in the iframe.
The auth cookie is HttpOnly, so Angular cannot read it. But since the cookie is set in the request header, the API (.NET) method must consider it to be authenticated, and this is not so. Anything I miss?
source share