StytchConsumer
The main entry point for the Stytch Consumer SDK.
Properties
A StateFlow that emits the current authentication state whenever it changes.
Biometric authentication.
Crypto wallet authentication.
Magic link authentication.
OAuth authentication (browser-based and native provider flows).
Passkey (WebAuthn) authentication.
Password-based authentication.
Session management.
TOTP (time-based one-time passcode) authentication.
User account management.
Functions
Authenticates a Stytch deeplink URL, dispatching to the appropriate auth method based on the token type embedded in the URL. Returns DeeplinkAuthenticationStatus.ManualHandlingRequired for password reset tokens, which must be handled by the caller.
Registers a callback that is invoked whenever the authentication state changes. Returns a JsCleanup that stops the observer when JsCleanup.stop is called.
Returns the current PKCE code pair if one has been generated and not yet consumed.
Parses a URL and returns the Stytch token it contains, or null if the URL is not a recognized Stytch deeplink.