Relative Content

Tag Archive for c#.netangularsignalr

Can not authenticate SignalR chat hub

Im making a real time chat app with .NET core 8 web api , signalr and angular. I use new authentication system introduced in .NET core 8 with token authentication.
I have implemented authentication from angular frontend and it works correctly and I access authorized methods.
But when I try to authenticate my chat hub it does not recognize it as authenticated user.
Also Context.User?.Identity?.IsAuthenticated this comes as false. but onConnectedAsync function is decorated as authorize and it works.