I’m building a backoffice feature using SignalR and need to access the current backoffice user. The problem is that when I add the Authorize attribute to my Hub I get a 401 error returned when a hub connection tries to establish. I am also unable to get the backoffice user using the IBackOfficeSecurityAccessorinstance passed in via the constructor for my Hub.
My setup at the moment is relatively simple:
Authorize(Policy = AuthorizationPolicies.BackOfficeAccess)]
public class MyHub : Hub<IMyHubEvents>
My route is configured as:
$"/{_umbracoPathSegment}/myhub"
I have enabled withCredentialsin my HubConnectionBuilder options as follows:
@KevinJump This current version of the feature is for Umbraco 13 - I’m not sure that UMB_AUTH_CONTEXT is available? Digging a bit deeper into that now but so far no luck.