Skip to main content

sdk.auth.email

sendOTP

Send a one-time password to a user’s email address.

Parameters

  • email (String) - User’s email address

Example

verifyOTP

Verify an email OTP code and authenticate the user.

Parameters

  • token (String) - OTP code entered by user

Example

resendOTP

Resend the email OTP.

Example

sdk.auth.sms

sendOTP

Send a one-time password to a user’s phone number via SMS.

Parameters

  • phoneData (PhoneData) - Phone data containing dial code, ISO code, and phone number

Example

verifyOTP

Verify an SMS OTP code and authenticate the user.

Parameters

  • token (String) - OTP code entered by user

Example

resendOTP

Resend the SMS OTP.

Example

sdk.auth.social

connect

Authenticate with a social provider (Google, Apple, Farcaster).

Parameters

  • provider (SocialProvider) - The social provider:
    • SocialProvider.google
    • SocialProvider.apple
    • SocialProvider.farcaster

Examples

sdk.auth.passkey

signIn

Authenticate with a passkey using the device’s biometric authentication.

Example

sdk.auth.externalAuth

signInWithExternalJwt

Sign in using an external JWT token.

Parameters

  • jwt (String) - The external JWT token

Example

Authentication State

authenticatedUser

Get the current authenticated user (synchronous).

Example

authenticatedUserChanges

Observe authentication state changes (reactive stream).

Example

StreamBuilder Example

token

Get the current authentication token (synchronous).

Example

tokenChanges

Observe authentication token changes (reactive stream).

Example

StreamBuilder Example

minAuthToken

Get the current minified authentication token. This is a compact JWT suitable for bandwidth-constrained environments.

Example

minAuthTokenChanges

Observe minified authentication token changes (reactive stream).

Example

StreamBuilder Example

Logout

logout

Log out the current user.

Example

Complete Authentication Flow Example

Email Authentication

SMS Authentication

Social Authentication

Passkey Authentication

Last modified on June 29, 2026