Skip to content

okta/okta-aspnet

Support

Okta ASP.NET middleware

This package will enable your ASP.NET application to work with Okta via OAuth 2.0/OIDC. You can follow our instructions below, check out our examples on GitHub or jump to our guides to see how to configure Okta with your ASP.NET applications.

We also publish these other libraries for .NET:

Release status

This library uses semantic versioning and follows Okta's library version policy.

✔️ The current stable major version series is: 4.x for Okta.AspNetCore and 2.x for Okta.AspNet.

Package Version Status Compatibility
Okta.AspNet.Abstractions 5.x ✔️ Stable .NET Standard 2.0 and .NET Framework 4.6.2 or higher.
Okta.AspNet.Abstractions 4.x ⚠️ Retiring November 28th, 2023 .NET Standard 2.0 and .NET Framework 4.5.2 or higher.
Okta.AspNet 3.x ✔️ Stable .NET Framework 4.6.2
Okta.AspNet 2.x ⚠️ Retiring .NET Framework 4.5.2
Okta.AspNetCore 4.x ✔️ Stable .NET Core 3.x, .NET 5.0, .NET 6.0, .NET 7.0 and .NET 8.0
Okta.AspNetCore 3.x ⚠️ Retiring .NET Standard 2.0 and .NET Core 2.x

The latest release can always be found on the releases page.

Need help?

If you run into problems using the SDK, you can

What you need

An Okta account (sign up for a forever-free developer account)

Getting Started

If you want to build an ASP.NET MVC application we highly recommend you to check out this guide to see what you need to get started and how sign users in your web application using the Okta ASP.NET SDK. You can also check out the following resources:

Also, if you want to build an ASP.NET Web API application check out this guide to see how to protect your endpoints using the Okta ASP.NET SDK. You can also check out the following resources:

To learn more about this library you can explore the following additional resources:

Contributing

Issues and Pull Requests are welcome! To build the project, clone and build it with Visual Studio 2017 or newer.

Be aware that these assemblies are strong-named:

  • Okta.AspNet
  • Okta.AspNet.Abstractions
  • Okta.AspNet.Test

In order to be able to debug those assemblies locally you can either remove strong-naming by unchecking "Sign the assembly" check box in the project options or temporarily add them to ignore list using the Strong Name Tool:

sn.exe -Vr (path-to)\Okta.AspNet.dll
sn.exe -Vr (path-to)\Okta.AspNet.Abstractions.dll
sn.exe -Vr (path-to)\Okta.AspNet.Test.dll

You should restart Visual Studio after making these changes.

Check out the Contributing Guide.