using Microsoft.AspNetCore.SignalR;
namespace SignalRAuthenticationSample
{
public class NameUserIdProvider : IUserIdProvider
public string GetUserId(HubConnectionContext connection)
return connection.User?.Identity?.Name;
}