Member Mananger and Signalr hubs.
# help-with-umbraco
e
I was wondering if anyone could help me. I've been following along with the example to create a signalr hub on https://docs.umbraco.com/umbraco-cms/implementation/custom-routing/signalr (using 13LTS version), and also to setup member registration https://docs.umbraco.com/umbraco-cms/tutorials/members-registration-and-login. 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, 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.
Figured it out. Websockets mapped to
/umbraco/<hub>
will use backoffice user auth, and
/<hub
will use front end user auth.
3 Views