XState-powered authentication flows for complex user interactions
AuthModalFlowProvider
wraps components that need authentication modal
access:
Area | Decision | Benefit | Cost or Risk |
---|---|---|---|
State Management | XState machine | Predictable, debuggable | Learning curve, complexity |
Modal Approach | Single modal for all flows | Consistent UX, simpler state | Less flexibility for custom flows |
Flow Progression | Email-first detection | Smooth UX, fewer decisions | Additional API call overhead |
Context Provider | React context | Easy component access | Provider nesting requirements |