oqtane / oqtane.framework

CMS & Application Framework for Blazor & .NET MAUI
http://www.oqtane.org
MIT License
1.9k stars 550 forks source link

[BUG] JWT Authentication broken after 5.2.2 SecurityStamp changes #4885

Open W6HBR opened 2 days ago

W6HBR commented 2 days ago

Oqtane Info

Version - 5.2.2 to 6.0.0 Render Mode - Interactive & Static Interactivity - Server Database - SQL Server

Describe the bug

Cannot use JWT bearer token for authentication. Returned user is always null. Issue started with addition of SecurityStamp in version 5.2.2.

Expected Behavior

Should be able to issue JWT bearer token and use for API authentication.

Steps To Reproduce

Use created token from external application (Postman for easy testing). If running in debugger, you will see exception at line 71 of JwtMiddleware.cs. Problem is line 61/62 always return null for user. External reply is always a 200 response.

Anything else?

I created fresh installs of 5.2.0, 5.2.1, 5.2.2, 5.2.3, 5.2.4 & 6.0.0. This functionality works fine for 5.2.0 & 5.2.1, but fails in all versions from 5.2.2 and on.

image

image

sbwalker commented 14 hours ago

I will investigate this further