How to pass "user information" to "HubConnectionBuilder()"

382 views Asked by At

Microsoft show us how to connect to SignalR with the following code

        connection = new HubConnectionBuilder()
            .WithUrl("http://localhost:53353/ChatHub")
            .Build();

but when you connect like this the Context.User.Identity.Name is null. Is there a way to pass user infomation through that HubConnectionBuilder method ?

0

There are 0 answers