Using the following code example https://github.com/leebrandt/okta-aspnet-mvc-authz-example
Scenarios
- (Works perfectly) - If a user sits on the page with out any activity for more than an hour the login session expires (.AspNet.Cookies) and when the user clicks to navigate to another page a status code 302 => okta auth occurs to authorize the user again “/oauth2/default/v1/authorize”
- (Fails - Cors) - If a user sits on the page with out any activity for more than an hour the login session expires (.AspNet.Cookies) and when the user clicks on a button to save some work via AJAX call a CORS error occurs because AJAX request has been blocked by the CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Do have any suggestions on how to fix this issue?