Public magic link onboarding — 7-state flow from contractor invite through claim to active customer. Source: app/(public)/join/[token].tsx
Customer magic link onboarding — 7-state public claim flow from invite token to active customer account. Handles new users (Case A), shadow users (Case B), and existing registered users (Case C).
Case A: new user creates shadow account. Case B: existing shadow claims invite. Case C: registered user signs in to link. All handled by one screen.
Tokens are SHA-256 hashed in storage. For Case C, token is moved to SecureStore with 1-hour expiry to prevent URL leakage during auth redirect.
Zero-friction entry via magic link. No password creation, no email verification step. Contractor context pre-fills invite details.
Network errors, missing tokens, storage failures, and mid-flow expiration all handled with distinct error states and recovery CTAs.