OKTA sign-in widget inside MVC app works fine when I navigate to this page manually, but when I access the controller decorated with [Authorize] attribute it redirects me to OKTA sign-in page

I’m using classic .NET MVC (not Core).
How to force my MVC app to redirect to my custom login screen that uses OKTA sign-in widget and not OKTA web site ?

I tried playing with Login redirect URIs and Initiate login URI settings, but it doesn’t change the behavior.



Hi @eugene159

Can you modify okta:OktaDomain variable to point out to the custom domain instead of the Okta domain?

Hi @dragos
I don’t have custom domain. I have a value https://dev-469498.okta.com in okta:OktaDomain. What do you want me to put there instead ?

Hi @eugene159

Can you please send us an email to developers@okta.com, explaining the use-case, so that one of our developer support engineers can get in a meeting with you and review the use-case?

Ok, will do. I tried to explain the issue here:

Laura agreed that the issue is present and created this ticket:

Even though I believe that this is not related to .NET middleware.