Releases: openiddict/openiddict-core
4.10.1
This release introduces the following changes:
- A bug preventing the
OpenIddictClientService.ChallengeUsingDeviceAsync()
andOpenIddictClientService.AuthenticateWithDeviceAsync()
APIs from flowing the additional device authorization request/token request parameters set by the application was identified and fixed (thanks @hangy for reporting it! ❤️)
5.0.0-preview3
This release introduces the following changes:
-
On .NET 7.0 and higher, the Entity Framework Core stores now use bulk updates and bulk deletes when large amounts of entities are expected to be updated/removed. If necessary, bulk operations can be disabled by calling
options.DisableBulkOperations()
in the OpenIddict EF Core stores options. -
A new
IOpenIddictTokenManager.RevokeByAuthorizationIdAsync()
API was introduced to dramatically improve the performance of token revocation when using the Entity Framework Core (.NET 7.0+-only) or MongoDB stores. -
The Entity Framework Core stores that use
IDbTransaction
were updated to run these operations inside execution strategies, which allows using the built-in stores withoptions.EnableRetryOnFailure()
without having to override them. -
The
IOpenIddictAuthorizationManager.PruneAsync()
andIOpenIddictTokenManager.PruneAsync()
APIs (and the corresponding stores methods) now return the number of authorizations/tokens that were removed. -
Constants for the standard claim request members were added (thanks @davhdavh! ❤️)
Note: 5.0.0-preview3
is likely one of the very last previews before RTM ships later this month. As such, OpenIddict users will be invited to start testing 5.0.0-preview3
and share their feedback during the next few weeks.
5.0.0-preview2
This release introduces the following changes:
-
All the OpenIddict packages now target .NET 8.0 (.NET Standard 2.0/2.1, .NET 6.0/7.0 and .NET Framework 4.6.1+ are still fully supported).
-
A Zoom.us integration was added to
OpenIddict.Client.WebIntegration
. -
The authentication results returned by
OpenIddictClientService
now expose the expiration date of access tokens (thanks @davhdavh! ❤️) -
To support advanced scenarios (e.g custom grants), the OWIN and ASP.NET Core hosts have been updated to return an
AuthenticateResult
with an empty main principal - and the additional principals attached toAuthenticateResult.Properties
- instead of a null result (see #1912 for more information).
4.10.0
This release introduces the following changes:
-
All the OpenIddict packages now target .NET 8.0 (.NET Standard 2.0/2.1, .NET Core 3.1, .NET 6.0/7.0 and .NET Framework 4.6.1+ are still fully supported).
-
A Zoom.us integration was added to
OpenIddict.Client.WebIntegration
. -
The authentication results returned by
OpenIddictClientService
now expose the expiration date of access tokens (thanks @davhdavh! ❤️)
5.0.0-preview1
For more information about this release, read Introducing native applications, per-client token lifetimes and client assertions support in OpenIddict 5.0 preview1.
4.9.0
This release introduces the following changes:
-
An Auth0 provider integration was added to
OpenIddict.Client.WebIntegration
(thanks @pableess! ❤️) -
OpenIddictClientService.AuthenticateWithDeviceAsync()
was fixed to honorDeviceAuthenticationRequest.Scopes
. -
The userinfo validation logic was improved to be compatible with more OAuth 2.0-only scenarios.
4.8.0
This release introduces the following changes:
-
The OpenIddict server stack was updated to be compatible with the new
Microsoft.IdentityModel.*
7.0 packages (that now useSystem.Text.Json
instead of an internal copy of JSON.NET). Users migrating toMicrosoft.IdentityModel.*
7.0 are strongly encouraged to bump OpenIddict to 4.8.0 at the same time to avoid compatibility issues (e.g missing claims). -
2 new providers have been added to
OpenIddict.Client.WebIntegration
:- JumpCloud
- Kakao (thanks @steveberdy! ❤️)
-
The
OpenIddict.*.DataProtection
packages have been updated to support customIDataProtectionProvider
instances that don't use the default magic header (thanks @sbolofsson! ❤️)
Special thanks to the IdentityModel team for the effort they put into Microsoft.IdentityModel.*
7.0 and for being extremely attentive to the community feedback 👏🏻
4.7.0
This release introduces the following changes:
Note
These changes are expected to drastically simplify using the OpenIddict client and its web integration companion package as drop-in replacements for the Microsoft OIDC/OAuth 2.0 handlers and the aspnet-contrib social providers. The aspnet-contrib providers are still supported, but the OpenIddict providers are now the recommended option for most scenarios.
- A built-in authentication scheme forwarding feature was added to the OpenIddict client: starting in OpenIddict 4.7, an authentication scheme will now be dynamically created for each client registration that has a non-null
OpenIddictClientRegistration.ProviderName
attached, which allows calling the ASP.NET CoreIAuthenticationService
APIs (or the equivalents inIAuthenticationManager
for OWIN) directly using the provider name instead of having to specify it as an authentication property:
app.MapGet("redirect-to-github", () => Results.Challenge(properties: null, authenticationSchemes: new[] { Providers.GitHub }));
- Client registrations with a non-null
OpenIddictClientRegistration.ProviderDisplayName
attached - which is the case for all the built-in web providers by default - will now be returned by ASP.NET Core Identity'sSignInManager.GetExternalAuthenticationSchemesAsync()
API and will automatically appear in the "external providers" list that is part of the default Identity UI:
- If necessary, this new authentication scheme forwarding feature can be disabled in the ASP.NET Core or OWIN options using the dedicated methods:
services.AddOpenIddict()
.AddClient(options =>
{
options.UseAspNetCore()
.DisableAutomaticAuthenticationSchemeForwarding();
});
services.AddOpenIddict()
.AddClient(options =>
{
options.UseOwin()
.DisableAutomaticAuthenticationTypeForwarding();
});
- To unify the claim types returned by standard OpenID Connect servers and custom OAuth 2.0 implementations, a native claims mapping feature was added to the OpenIddict client to map the standard and non-standard claims to their
ClaimTypes.Name
,ClaimTypes.NameIdentifier
andClaimTypes.Email
equivalent, which will improve the compatibility with libraries like ASP.NET Core Identity that use hardcodedClaimTypes
/WS-Federation claims (note: unlike the Microsoft/aspnet-contrib handlers, the original claim types are not removed from the final principal). This feature is enabled by default and can be disabled manually if necessary:
services.AddOpenIddict()
.AddClient(options =>
{
options.DisableWebServicesFederationClaimsMapping();
});
-
To match the logic used by the Microsoft ASP.NET Core OIDC handler, the expiration dates of the backchannel and frontchannel access tokens (when available) are now stored as special properties in
AuthenticationProperties
. -
3 new providers have been added to
OpenIddict.Client.WebIntegration
:- Nextcloud (thanks @EMostafaAli! ❤️)
- SubscribeStar
- Tumblr
-
The Shopify provider now allows setting a static shop name that will be used if no shop name is attached to the challenge properties, which is useful for scenarios where only one shop is used and doesn't need to be set dynamically (e.g employees authentication).
options.UseWebProviders()
.AddShopify(options =>
{
// ...
options.SetShopName("shopname");
});
-
The ADFS provider no longer uses the userinfo endpoint to avoid errors happening when a non-default
resource
is configured. -
An issue preventing user-defined parameters attached to
AuthenticationProperties.Parameters
(orProcessChallengeContext.Parameters
by a custom event handler) from being correctly added to sign-out requests has been identified and fixed (thanks @stasnocap!). -
Behavior breaking change: the userinfo claims returned by the Patreon and Streamlabs providers are no longer flattened. Users of these providers are invited to update their callback action to ensure the claims are correctly extracted.
Known issues:
- OpenIddict 4.7.0 references MongoDB 2.20 on .NET 6 and .NET 7. Unfortunately, an unresolved bug affecting
IQueryable<T>
support in the new MongoDB LINQ v3 provider may prevent certain APIs likeIOpenIddictMongoDb*Store.GetAsync()
orIOpenIddictMongoDb*Store.ListAsync()
from working correctly. While OpenIddict itself doesn't use these APIs, applications that require them can manually downgrade the MongoDB LINQ v3 provider version used for the OpenIddict database (thanks @Nfactor26! ❤️):
services.AddOpenIddict()
.AddCore(options =>
{
var client = new MongoClient(new MongoClientSettings
{
LinqProvider = LinqProvider.V2
});
options.UseMongoDb()
.UseDatabase(client.GetDatabase("openiddict"));
});
4.6.0
This release introduces the following changes:
-
9 new provider integrations have been added to
OpenIddict.Client.WebIntegration
:- Adobe
- Autodesk
- Kroger
- Lichess
- Notion
- Salesforce
- Shopify
- Verimi (thanks @MarcelMalik for your contribution! ❤️)
- Webex (Cisco)
-
References to Azure Active Directory in the code documentation have been replaced by "Microsoft Entra ID" to match the new name of the service (see https://techcommunity.microsoft.com/t5/microsoft-entra-azure-ad-blog/azure-ad-is-becoming-microsoft-entra-id/ba-p/2520436 for more information).
-
For better interoperability, the
plain
code challenge method is now allowed by default when enabling the authorization code or hybrid flows (note: the saferS256
method remains the recommended option and will always be preferred by the OpenIddict client).
Note
At this stage, it's unlikely I'll port additional aspnet-contrib OAuth 2.0 providers myself as the remaining services all have a complicated registration process that makes them unattractive (e.g submission of new OAuth 2.0 clients no longer possible, missing documentation, phone number verification required, testing of development applications behind a paywall, etc.). Of course, pull requests sent by external contributors to implement these providers are accepted and are more than welcome. For more information, read #1801.
4.5.0
This release introduces the following changes:
- It is now possible to have multiple web providers of the same type, which is particularly useful for self-hosted providers like ADFS. To highlight that, the
options.UseWebProviders().Use[Provider]()
APIs have been deprecated and replaced by newoptions.UseWebProviders().Add[Provider]()
equivalents:
options.UseWebProviders()
.AddActiveDirectoryFederationServices(options =>
{
options.SetIssuer("https://extranet.contoso.com/adfs")
.SetProviderName("Contoso")
.SetClientId("s6BhdRkqt3")
.SetClientSecret("7Fjfp0ZBr1KtDRbnfVdmIw")
.SetRedirectUri("callback/login/contoso");
})
.AddActiveDirectoryFederationServices(options =>
{
options.SetIssuer("https://extranet.fabrikam.com/adfs")
.SetProviderName("Fabrikam")
.SetClientId("3tqkRdhB6s")
.SetClientSecret("wImdVfnbRDtK1rBZ0pfjF7")
.SetRedirectUri("callback/login/fabrikam");
});
- Multiple client registrations using the same
Issuer
URI are now supported. Specifying the issuer URI or provider name in challenge/sign-out properties is still fully supported, but setting the newOpenIddictClientRegistration.RegistrationId
property is required when adding multiple client registrations that share the same issuer or provider name:
var properties = new AuthenticationProperties(new Dictionary<string, string>
{
[OpenIddictClientAspNetCoreConstants.Properties.RegistrationId] = "B8E10AE5-9C68-409B-B94B-7E402F8C323C"
});
- New
OpenIddictClientService
APIs accepting and returning records have been introduced to makeOpenIddictClientService
much easier to work with and more extensible (the old overloads are still functional but are decorated with[Obsolete]
and will be removed in a future version):
var result = await _service.AuthenticateWithPasswordAsync(new PasswordAuthenticationRequest
{
Username = "johndoe",
Password = "A3ddj3w",
Scopes = new() { Scopes.Profile }
});
-
OpenIddict.Client.SystemIntegration
is no longer considered experimental and can now be used without<EnablePreviewFeatures>true</EnablePreviewFeatures>
. -
OpenIddict.Client.SystemIntegration
was updated to throw a detailed exception if noCoreWindow
is attached to the calling thread when triggering an interactive challenge with the UWP web authentication broker configured as the authentication mode, which will make the factWebAuthenticationBroker
is not supported in Win32 applications more apparent.