Skip to content

Blazor .NET 8 Error #260

@jmiller76

Description

@jmiller76

Describe the bug?

After updating to 4.6, my Blazor app is failing to authenticate.
Can reproduce with .NET 6 Sample code (after upgrading to .NET 8)

What is expected to happen?

Authentication

What is the actual behavior?

An unhandled exception occurred while processing the request.
SecurityTokenException: The Validated Security Token must be of type JsonWebToken, but instead its type is 'System.IdentityModel.Tokens.Jwt.JwtSecurityToken'.
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.ValidateTokenUsingHandlerAsync(string idToken, AuthenticationProperties properties, TokenValidationParameters validationParameters)

AuthenticationFailureException: An error was encountered while handling the remote login.
Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler.HandleRequestAsync()

Reproduction Steps?

Pull https://github.com/okta/samples-blazor, use Upgrade Assistant to move the demo to .NET 8.
Update Appsettings to working API keys
Test - All works
Update NuGet package Okta.AspNetCore to 4.6.0
Test - Above Error show

Additional Information?

No response

.NET Version

8.0.200

SDK Version

4.6

OS version

BuildNumber Caption OSArchitecture Version
22631 Microsoft Windows 11 Enterprise 64-bit 10.0.22631

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions