.net 8 SignalR AddMicrosoftIdentityWebApp Authentication #52775
Unanswered
carlberg74
asked this question in
General
Replies: 1 comment
-
Seem to be same issue or related to #52075 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
After some struggling, I got SignalR authentication to work with Azure AD in .net 7.
This by providing the accesstoken as option to HubConnectionBuilder (options.AccessTokenProvider) and using AddJwtBearer OnTokenValidated to set the token as claim on the context.Principal.AddIdentity
and in the Hub, use [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)].
All this so I can use Context.User in the Hub.
But something has changed with .net 8 it seem.. as that dont seem to work anymore..
using .net sdk 8.0.100 and packages:
Anyone got this working and could maybe provide some info/example?
Beta Was this translation helpful? Give feedback.
All reactions