StytchB2B
Main entry point for the Stytch B2B SDK.
Provides access to all B2B authentication methods and session management. Create an instance with createStytchB2B.
Properties
A StateFlow emitting the current authentication state whenever it changes.
Cross-org discovery flow methods for listing and joining organizations.
Magic link authentication methods.
Member management methods.
OAuth authentication methods.
Organization management methods.
OTP (SMS and email) authentication methods.
Password-based authentication methods.
Role-based access control (RBAC) methods.
Recovery code management methods.
SCIM provisioning methods.
Session management methods.
SSO authentication methods.
TOTP authenticator methods.
Functions
Handles an incoming deeplink URL, authenticating the token it contains if possible.
Subscribes to authentication state changes via a callback. Returns a JsCleanup whose JsCleanup.stop cancels the subscription.
Returns the current PKCE code pair if one exists (used for advanced manual flows).
Parses a URL and returns a DeeplinkToken if it contains a Stytch token, or null otherwise.