-
-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InvalidOperationException: Cannot redirect to the authorization endpoint, the configuration may be missing or invalid. #2033
Comments
Hi, Unfortunately, you're very likely hitting this IdentityModel bug, introduced in the 7.4.0 version referenced by OpenIddict 5.3.0: AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#2514. Sadly, they haven't released a fix yet. You have a few options:
|
Note: if you're interested in giving it a try, don't hesitate to take a look at the samples repo (all the samples now use it): https://github.com/openiddict/openiddict-samples |
@kevinchalet we are working on the issue. |
I reproduced the issue locally and it indeed works fine if both Repro: <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="7.4.0" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="7.3.1" />
</ItemGroup>
</Project> using Microsoft.IdentityModel.Protocols.OpenIdConnect;
var json = $$"""
{
"issuer": "https://localhost:44395/",
"authorization_endpoint": "https://localhost:44395/connect/authorize"
}
""";
var configuration = new OpenIdConnectConfiguration(json);
Console.WriteLine(configuration.AuthorizationEndpoint); |
I've been trying to figure out why I was getting this error for 2 days now 😭 |
hi They fixed the AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#2491 |
Hey @maliming, Well, it's a bit more complicated: just referencing the latest version of that package isn't enough, you need to ensure all the IdentityModel packages - directly referenced or brought transitively - are the same version. If you're seeing issues in ABP Framework in the projects that use ASP.NET Core's OIDC or JWT handlers, I'd recommend explicitly referencing both |
Can confirm version 7.4 fixes the issue. 7.3 and 8+ was not working for me.
|
Faced the same issue upon upgrading identity libraries to 8+, we kept at 7+ for the time being. |
Are you sure all the versions were consistent? OpenIddict 5.8.0 uses IM 8.0+ on .NET 8.0+ and I haven't heard of any issue (at least that wasn't caused by a mismatch 😄) |
Confirm you've already contributed to this project or that you sponsor it
Version
5.0.3
Question
I have an OpenIddict server still on 4.10.1 and NET7. I have a blazor server-side app that I upgraded to NET8 and OpenIddict 5.0.3. The project compiled successfully and no additional changes were made. When I start the app I get the following exception:
Are there any other changes that need to be done client-side?
The text was updated successfully, but these errors were encountered: