I was wondering if anyone could help me. I’ve been following along with the example to create a signalr hub on Adding a hub with SignalR and Umbraco | Umbraco CMS (using 13LTS version), and also to setup member registration Member Registration and Login | Umbraco CMS.
These great articles work well individually, but I’m struggling to get them working together, in that I’d like the signalr hub to know who the logged in member is. Accessing Context?.User?.Identity?.Name returns null.
I’ve tried creating a token generation endpoint and passing that into the accessTokenFactory of the signalr hub builder on the client, but not had much luck. The asp.net core identity docs say that signalr should pick up the default identity cookie automatically (Authentication and authorization in ASP.NET Core SignalR | Microsoft Learn), so wondering if I am missing some
bit of config (the MS docs on this are a bit of a maze).
If anyone could help that would be great.
This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/114786-reading-member-identity-in-signalr-hub