Angular on IIS - How?

Hello All,

I am new to Okta.

I have successfully used the SDK to create test apps (Angular 13/14) in local dev environment.

The Okta App is configured as SPA, PKCE, OIDC,

The attempts to the publish test apps to Staging and Production IIS servers (2016 and 2012r2) have not been successful.

Confirmed:
No angular route hash ( # fragments not allowed in OIDC auth)
The Sign-in redirect URI is confirmed and all lower case (each environment dev, staging, production)
IIS has URL Rewrite rules are in place. Also tested without them. Same results

Issue presents as:
403 - Forbidden: Access is denied

Question:
What is different in the default IIS “Static App” index.html default document application setup than testing the same app in Angular development environment.

In other words - I assume many people have successfully deployment Okta protected Angular apps to IIS. I have reviewed dozens of posts and almost all point to one or more of the three items that I have listed. What should I check? Can anyone point me to the documentation that I may have missed. Thank you in advance.

Hi there @RobertBurgh!

Let’s try a few gut checks. Do you have the IIS staging location configured in Okta as allowed origins? This includes within the Okta application configuration as well as Trusted origins.

Have you tried hosting your built Angular app locally and verifying login so you can compare IIS rewrite rules? Do you have the ability to try hosting the application on your staging environment outside of IIS? Trying to think of ways to narrow down variables at play.

To answer your question regarding what the difference is, it can be quite a bit. First and foremost is defined origins within Okta. If you run with ng serve, then that may be different output from creating build distributables (dependent on your build process), and whether your staging server has appropriate configs.

I saw you said you extensively researched docs and content about IIS, but I’ll post these links in case other people stumble upon this post and are looking for a starting point:

Let us know how that testing goes!