Authentication and authorization in ASP.NET Core SignalR | Microsoft Learn | Hub Connection with JWT

PHOTO EMBED

Sun Jul 02 2023 19:26:54 GMT+0000 (Coordinated Universal Time)

Saved by @cameron_v_r

// Connect, using the token we got.
this.connection = new signalR.HubConnectionBuilder()
    .withUrl("/hubs/chat", { accessTokenFactory: () => this.loginToken })
    .build();
content_copyCOPY

The server validates the token and uses it to identify the user. This validation is done only when the connection is established. During the life of the connection, the server doesn't automatically revalidate to check for token revocation.

https://learn.microsoft.com/en-us/aspnet/core/signalr/authn-and-authz?view