Authenticate users with @abstraxn/signer-react-native.
All examples assume your tree is wrapped in AbstraxnProvider (see Installation).
Email OTP
Social OAuth (deep link)
RN cannot use a browser popup the same way as web. Flow:- Call
getGoogleAuthUrl/getDiscordAuthUrl/getTwitterAuthUrlwith your redirect / universal link origin. - Open the returned
authUrl(WebBrowser.openAuthSessionAsync,Linking.openURL, etc.). - 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
SetrpId on the provider (and link the app to that domain):
- iOS: Associated Domains →
webcredentials:<rpId>+ validapple-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
allowCredentialsunless you passoverrides.credentialId. - No account mix-up: passkey login clears prior stored
USER/WHOAMIbefore 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 returnssessionKeyRegistered: true. This matches the web SDK and avoids laterPUBLIC_KEY_NOT_FOUNDsigning errors. - No current Activity (Android,
0.1.3+): if the passkey prompt runs while no Activity is available, the SDK rejects withNoActivity/"No current activity — please try again"instead of crashing onnull. Apps can dropPasskeyModule.kt/patch-packageworkarounds.NO_ACTIVITY_PASSKEY_ERRORis exported from core.