I have the Asp.net MVC Example project configured to use my dev okta SSO.
I have modified my actual application to use the same code and values.
With the example app I can log in and view the profile page showing the correct user data and log out.
With my real application:
- If I am not already logged in, I will get the login page as expected. After logging in I am redirected to my external login page where I expect to be redirected to after logging in. Except: Request.IsAuthenticated is False and Page.User.Identity.isAuthenticated is also false.
- If I start a new debugging session after #1 I will not be redirected to the okta login, and instead go straight to my external login page where I am once again told I am not not authed.
- If I now launch the Example project, I will also skip the okta login but if I debug the profile page, I can see that IsAuthenticated is true and the Page.User object is filled in corrected.
- if I now click logout using the example app I get logged out as expected.
- If I launch my real app, I will now be redirected to the okta login page.
The app knows if the login should be shown or not.
The app does not know if the user is authorized after successfully logging in.
Any ideas why I have this disconnect?