|
1 | 1 | # Change Log |
2 | 2 |
|
| 3 | +## [1.0.0-beta.6](https://github.com/auth0/aspnetcore-api/tree/1.0.0-beta.6) (2026-05-21) |
| 4 | + |
| 5 | +> **⚠️ This release contains breaking changes.** Please read the notes below before upgrading. |
| 6 | +
|
| 7 | +### Breaking Changes |
| 8 | + |
| 9 | +#### 1. `Auth0ApiOptions.JwtBearerOptions` removed — use `Audience` instead |
| 10 | + |
| 11 | +`Auth0ApiOptions` no longer exposes a `JwtBearerOptions` property. The `Audience` value is now a |
| 12 | +first-class property on `Auth0ApiOptions`. |
| 13 | + |
| 14 | +```csharp |
| 15 | +// Before |
| 16 | +builder.Services.AddAuth0ApiAuthentication(options => |
| 17 | +{ |
| 18 | + options.Domain = "tenant.auth0.com"; |
| 19 | + options.JwtBearerOptions = new JwtBearerOptions { Audience = "https://your-api" }; |
| 20 | +}); |
| 21 | + |
| 22 | +// After |
| 23 | +builder.Services.AddAuth0ApiAuthentication(options => |
| 24 | +{ |
| 25 | + options.Domain = "tenant.auth0.com"; |
| 26 | + options.Audience = "https://your-api"; |
| 27 | +}); |
| 28 | +``` |
| 29 | + |
| 30 | +#### 2. `AddAuth0ApiAuthentication(...)` signature changed — JWT customization moved to a separate callback |
| 31 | + |
| 32 | +Any additional `JwtBearerOptions` customization that previously lived inside `Auth0ApiOptions` |
| 33 | +must now be passed as an optional second argument (`configureJwtBearer`). |
| 34 | + |
| 35 | +```csharp |
| 36 | +// Before |
| 37 | +builder.Services.AddAuth0ApiAuthentication(options => |
| 38 | +{ |
| 39 | + options.Domain = "tenant.auth0.com"; |
| 40 | + options.JwtBearerOptions = new JwtBearerOptions |
| 41 | + { |
| 42 | + Audience = "https://your-api", |
| 43 | + TokenValidationParameters = new TokenValidationParameters { ... } |
| 44 | + }; |
| 45 | +}); |
| 46 | + |
| 47 | +// After |
| 48 | +builder.Services.AddAuth0ApiAuthentication( |
| 49 | + options => |
| 50 | + { |
| 51 | + options.Domain = "tenant.auth0.com"; |
| 52 | + options.Audience = "https://your-api"; |
| 53 | + }, |
| 54 | + configureJwtBearer: jwtOptions => |
| 55 | + { |
| 56 | + jwtOptions.TokenValidationParameters = new TokenValidationParameters { ... }; |
| 57 | + }); |
| 58 | +``` |
| 59 | + |
| 60 | +The recommended registration now also supports direct `IConfigurationSection` binding: |
| 61 | + |
| 62 | +```csharp |
| 63 | +// Recommended — binds Domain and Audience from appsettings.json |
| 64 | +builder.Services.AddAuth0ApiAuthentication(builder.Configuration.GetSection("Auth0")); |
| 65 | +``` |
| 66 | + |
| 67 | +#### 3. `WithDPoP(...)` no longer accepts an authentication scheme parameter |
| 68 | + |
| 69 | +DPoP is now automatically scoped to the scheme of the `Auth0ApiAuthenticationBuilder` it is |
| 70 | +chained from. Remove any scheme argument passed to `WithDPoP`. |
| 71 | + |
| 72 | +```csharp |
| 73 | +// Before |
| 74 | +builder.Services.AddAuth0ApiAuthentication(...).WithDPoP("Bearer"); |
| 75 | + |
| 76 | +// After |
| 77 | +builder.Services.AddAuth0ApiAuthentication(...).WithDPoP(); |
| 78 | +``` |
| 79 | + |
| 80 | +#### 4. Stricter startup validation — app will fail to start for invalid configuration |
| 81 | + |
| 82 | +The SDK now validates configuration at startup and throws if any of the following are detected: |
| 83 | + |
| 84 | +| Condition | Error | |
| 85 | +|---|---| |
| 86 | +| `Domain` is missing or empty | `OptionsValidationException` | |
| 87 | +| No audience configured (neither `Audience` nor `JwtBearerOptions.ValidAudiences`) | `OptionsValidationException` | |
| 88 | +| `Domain` contains a scheme, path, port, or query string (e.g. `https://tenant.auth0.com`) | `OptionsValidationException` | |
| 89 | +| `JwtBearerOptions.EventsType` is set | `OptionsValidationException` — use `Events` instead | |
| 90 | + |
| 91 | +### Added |
| 92 | + |
| 93 | +- Support for binding `Auth0ApiOptions` directly from `IConfigurationSection` (e.g. `appsettings.json`, environment variables) [\#59](https://github.com/auth0/aspnetcore-api/pull/59) |
| 94 | +- New `AddAuth0ApiAuthentication(IConfigurationSection, ...)` overloads on both `IServiceCollection` and `AuthenticationBuilder` |
| 95 | +- Startup validation with fast-fail error messages for misconfigured domains, missing audience, and unsupported `EventsType` usage |
| 96 | + |
| 97 | +### Security |
| 98 | + |
| 99 | +Dependency upgrades [\#65](https://github.com/auth0/aspnetcore-api/pull/65), [\#58](https://github.com/auth0/aspnetcore-api/pull/58): |
| 100 | + |
| 101 | +| Package | From | To | |
| 102 | +|---|---|---| |
| 103 | +| `Microsoft.AspNetCore.Authentication.JwtBearer` | 8.0.25 | 8.0.27 | |
| 104 | +| `Microsoft.Extensions.Logging.Abstractions` | 10.0.5 | 10.0.8 | |
| 105 | + |
| 106 | +<details> |
| 107 | +<summary>Dev / CI-only dependency updates</summary> |
| 108 | + |
| 109 | +| Package | From | To | |
| 110 | +|---|---|---| |
| 111 | +| `Microsoft.NET.Test.Sdk` | 18.3.0 | 18.5.1 | |
| 112 | +| `Microsoft.SourceLink.GitHub` | 10.0.201 | 10.0.300 | |
| 113 | +| `coverlet.collector` | 8.0.1 | 10.0.1 | |
| 114 | +| `codecov/codecov-action` | 6.0.0 | 6.0.1 | |
| 115 | +| `actions/upload-pages-artifact` | 4 | 5 | |
| 116 | + |
| 117 | +</details> |
| 118 | + |
3 | 119 | ## [1.0.0-beta.5](https://github.com/auth0/aspnetcore-api/tree/1.0.0-beta.5) (2026-04-09) |
4 | 120 |
|
5 | 121 | **Added** |
|
0 commit comments