Authenticate users with @abstraxn/signer-react-native.
All examples assume your tree is wrapped in AbstraxnProvider (see Installation).

Email OTP

Or mount the optional sheet:
RN cannot use a browser popup the same way as web. Flow:
  1. Call getGoogleAuthUrl / getDiscordAuthUrl / getTwitterAuthUrl with your redirect / universal link origin.
  2. Open the returned authUrl (WebBrowser.openAuthSessionAsync, Linking.openURL, etc.).
  3. When the app resumes via deep link, call completeOAuthReturnFromUrl(url, provider).
Legacy backends that return OAuth code + state to the app can use handleGoogleCallback(code, state) (and Discord / Twitter equivalents) instead of completeOAuthReturnFromUrl.

Passkeys

Set rpId on the provider (and link the app to that domain):
  • iOS: Associated Domains → webcredentials:<rpId> + valid apple-app-site-association
  • Android: Digital Asset Links at https://<rpId>/.well-known/assetlinks.json (package + SHA-256)

Behavior notes (core 0.1.2+ / 0.1.3+)

  • Discoverable login: last-used credential is not forced into allowCredentials unless you pass overrides.credentialId.
  • No account mix-up: passkey login clears prior stored USER / WHOAMI before applying the login response profile.
  • Session key: after login, the SDK may prompt for the same passkey a second time to register the device session key (POST /auth/passkey/register-session), unless the backend returns sessionKeyRegistered: true. This matches the web SDK and avoids later PUBLIC_KEY_NOT_FOUND signing errors.
  • No current Activity (Android, 0.1.3+): if the passkey prompt runs while no Activity is available, the SDK rejects with NoActivity / "No current activity — please try again" instead of crashing on null. Apps can drop PasskeyModule.kt / patch-package workarounds. NO_ACTIVITY_PASSKEY_ERROR is exported from core.

Next