I have an ASP.NET Core Web API backend with a vuejs spa and I would like to implement SAML 2.0 authentication.
I use itfoxtec package and it works perfectly in dev environment because client and server do not have the same url.
When I deploy API server and vue client in IIS with inProcess hostingModel, I have the same URL for client and server and post assertion redirect doesn't work because IIS try to call the server instead of client vue router.
I know that SAML is not adapted to SPA but we have to deploy it.
Here is the scenario :
- user click on connect button
- client call Login on backend

- backend generate redirection

- backend return redirecturl for authentication
- Client set href to redirect
- User log in with its credentials
- Idp return assertion and call backend method

- backend return a redirect to specific page on client to get user and cache it.
Last step works if client have different port but with same port, the redirect is treated by IIS like a backend call and return a 404 error.
I try URL rewrite but without success.
Thank you for your help