Skip to main content

Authentication

Learn about authentication in the Azeoo SDK. These concepts apply to all platforms. The examples below use Flutter (Dart); for Android, iOS, and React Native, see your platform's Configuration and Client API (Android · iOS · Flutter · React Native).

Authentication flow

  1. Initialize the SDK with your API key and options (no user yet).
  2. Connect with the authenticated user's userId and token (e.g. from your auth provider).
  3. The SDK stores and uses the token for API calls; refresh is handled internally where supported.
  4. Disconnect when the user logs out to clear the session.

Connect (provide token)

Pass the user's ID and token when you call connect after initialize:

// Flutter
await AzeooSDK.connect("user-123", "your-auth-token");

On Android/iOS/React Native, use the equivalent connect(userId, token) API on the SDK instance.

Token management

The SDK handles token storage and usage for API requests. Configure any token refresh or validation in your app before calling connect with a valid token.

Disconnect (logout)

// Flutter
await AzeooSDK.disconnect();

This clears the current user and session. The SDK remains initialized; you can call connect again with another user.

Next Steps