Asp.net Webforms - Okta OIDC Request.IsAuthenticated is always coming as false

Trying to implement OKTA in one of the existing ASP.Net Webforms. This was successful in a test application when I followed the instructions in the link https://developer.okta.com/blog/2018/08/29/secure-webforms-with-openidconnect-okta
I have implemented the same in our application and I could see the redirection is happening without any issue. But Request.IsAuthenticated is always coming as false, also not seeing any claim information in Thread.CurrentPrincipal.

What should be the authentication tag in the web.config when implementing okta ? I currently has this as Forms authentication.

Can you share the code you are using to:

  • Challenge the user (trigger the redirect)
  • Check for IsAuthenticated

This blog post series goes into a lot of detail on how to migrate a Web Forms project that uses Forms Authentication to OWIN. You may have already done these steps, but if not it is worth reviewing :slight_smile:

Hey, I was able to figure the issue. I had the in my web.config which I need to comment. Now this is working fine. Thanks.

Also thanks for the link , its a great read !

No problem, glad you got it working!

Out of curiousity, what was the line in web.config you needed to comment out?

<deny users="?"/>
Didnt realize I missed the tag in my previous post :slight_smile:

1 Like

I am facing the same issue, and the mentioned suggestion doesn’t seems to work. Is there any resource present that can help us out.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.