Events
Subscribe to SDK lifecycle events for analytics, logging, and custom UI state management.
The AuthenSee SDK emits events throughout the enrollment and authentication lifecycle. Use events for analytics tracking, custom UI state management, and debugging.
Subscribing to events
Unsubscribing
All events
Event reference
enrollment.started
Fired when the enrollment flow begins (after enroll() is called).
enrollment.complete
Fired when enrollment finishes successfully. The Merkle root has been registered with the server.
enrollment.failed
Fired when enrollment fails (network error, invalid commitment, etc.).
auth.started
Fired when the authentication flow begins (after authenticate() is called). The SDK has requested a challenge from the server.
auth.success
Fired when authentication succeeds. The server has verified the proof and issued a JWT.
auth.failure
Fired when authentication fails (invalid proof, expired challenge, etc.).
factor.enrolled
Fired when a single factor is successfully enrolled (during multi-factor enrollment, this fires per factor).
factor.updated
Reserved for the proof-gated factor-rotation flow — updateFactor() currently throws (see Enrollment), so this event does not fire yet.
proof.generating
Fired when the native prover starts generating a ZK proof. This is the most time-intensive step in the authentication flow. Use this to show a progress indicator.
proof.complete
Fired when the ZK proof has been generated on-device, before it is submitted to the server.
Example: full lifecycle tracking
Next
- UI components —
useProofProgress()wraps these events as React state - Authentication — the flow these events narrate
- Theming — styling the states you build from them