HomeChallengesRepsProblemsLeaderboardTake a challenge

The receipt sent to the wrong phone

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.

Intermediate20 min on the clock5 graded checks · 100 pointsServices That Fail Politely
Graded by reading your code against the checklist below.

What you build

  • Send from outside the hub through IHubContext
  • Address the customer on the order, not the current connection
  • Stop registering the hub as a singleton; register the notifier instead
  • Make SignalR’s user id the token’s "sub" claim
  • Accept a query-string token on the hub path only

Done means

IHubContext addressed to the order’s customer, no singleton hub, a sub-based user id, and query tokens accepted only on the hub path.

How it is graded

Published in full, before you start — every point is one of these and there is nothing else.

  1. Sends through IHubContext+25Pushing to one user, not the last one
  2. Addressed to the customer on the order+25Pushing to one user, not the last one
  3. The notifier is registered, not the hub+15Pushing to one user, not the last one
  4. SignalR’s user id is the "sub" claim+15Authentication and tokens
  5. A query-string token only on the hub path+20Authentication and tokens

What it teaches

The rest of Services That Fail Politely