I have already spent more than a month solving this problem to no avail.
The goal is to get user claims in a Signalr hub in a Blazor server app. I have uploaded a very simple app on my Github. The client can invoke a method on the hub by clicking a button, the hub method sends back a message with User.Identity.Name. However, since the user claims are null, I cannot get the name.
Here is the repository: https://github.com/aadurham/blazorserverauth
So many people are asking the same question here and elsewhere. Information/suggestions/solutions are scattered. It has proved to be impossible for me (probably for anybody at my level of programming) to bring together those pieces and make them work.
I suspect that it would not take much time for a good programmer to put the pieces together in the simple app above. I am sure many people, including myself, would benefit from it. I hope some good Samaritan can lend a hand. In that case, please make a pull request. I will keep the code there for others' use and will try to add later a manual. I will also come back and try to do the same with a similarly simple Blazor WASM app.
Many thanks in advance