Pushing to one user, not the last oneintermediate
A SignalR hub object lives for one call and then is thrown away, so sending from anywhere else goes through IHubContext and has to name the user it is for.
Order confirmations arrive, but on somebody else’s screen. The hub is a singleton that sends to whoever touched it last, and the query-string token is accepted on every URL.
IHubContext addressed to the order’s customer, no singleton hub, a sub-based user id, and query tokens accepted only on the hub path.
Published in full, before you start — every point is one of these and there is nothing else.
A SignalR hub object lives for one call and then is thrown away, so sending from anywhere else goes through IHubContext and has to name the user it is for.
A JWT is a signed note saying who the caller is; issuing one, refreshing it before it expires, and never storing a password in plain text are the three things every API has to get right.