Skip to main content
Authentication establishes an access credential. Wallet selection then activates a wallet and completes the wallet session. Reuse the single omsWallet instance created in the quickstart throughout every flow.

OIDC ID token

When your host app’s provider integration returns an OIDC ID token, pass that token directly to OMS Wallet. The OMS Wallet SDK validates the token and establishes the wallet credential; it does not acquire the provider token.
idToken above is the value returned by your app’s native provider code. Configure that provider to issue the token for the same client ID passed as audience. Sign-in requests a 180-day session by default (DEFAULT_SESSION_LIFETIME_SECONDS). Set sessionLifetimeSeconds to an integer from 1 through 15,552,000 (MAX_SESSION_LIFETIME_SECONDS) for a shorter hard limit; an invalid value rejects with OMS_VALIDATION_ERROR before any request. A session also ends after about 10 days without use. See sessions and access.

Authenticate with email OTP

Email authentication has a request and completion step:
The requested session lifetime belongs on startEmailAuth, not completeEmailAuth.

Authenticate with an OIDC redirect

Use redirect authentication when the provider integration does not supply an ID token. Fixed OMS relay configurations are available for Google and Apple:
The start call also accepts loginHint, sessionLifetimeSeconds, and walletSelection. Leave wallet selection undefined for the automatic default. Open started.authorizationUrl in the platform authentication browser, then pass its returned URL to the SDK:
An unrelated URL returns notOidcRedirectCallback; a callback without stored pending auth returns noPendingAuth. Provider failures reject with OMSWalletError rather than returning another callback result variant.

Open the authentication browser

Bare React Native and Expo use different browser dependencies:
Configure callbackUri in the app’s native deep-link configuration.

Configure the app callback

For a bare Android app, add a browsable intent filter to the activity that receives the callback. Keep launchMode="singleTask" so an existing activity receives warm links:
For a bare iOS app, register com.example.app under CFBundleURLTypes in Info.plist. Expo generates both native configurations from the scheme field:
The authentication-browser result covers the normal return. If the operating system instead delivers the callback as an app link, obtain warm links from React Native’s Linking.addEventListener('url', ...) and cold-start links from Linking.getInitialURL(), then pass the URL directly to handleOidcRedirectCallback. Route each URL once; a repeated matching callback returns noPendingAuth after the first attempt is consumed.

Use a custom OIDC provider

Use CustomOidcProviderConfig only when your project owns the provider configuration. providerRedirectUri must exactly match a URI registered with the provider.
Use authorizeParams on the start call for per-attempt authorization parameters.

Select a wallet manually

Request manual selection only when your app provides its own wallet picker:
Use the methods on pendingSelection to finish the same authentication attempt. selection.claimableWallets lists preallocated wallets of the requested type, which selection.claimAndSelectWallet(walletId) claims and activates. The same walletSelection option is available for ID-token and redirect authentication.

Choose a wallet type

Sign-in activates an Ethereum wallet by default. Pass walletType: 'solana' or walletType: 'tron' to completeEmailAuth, signInWithOidcIdToken, or the redirect provider configuration to select or create a wallet of that type instead.

Claim a preallocated wallet

Your project can preallocate a receive-only wallet for a user’s email address through the OMS API, for example to fund it before the user signs in. When the user signs in and proves that email, with email OTP or an OIDC provider that reports a verified email, the wallet is claimable. Claiming makes the user its owner and lets the session sign with it. Sign-in is the only place claimable wallets are reported; listWallets includes a wallet only after it is claimed.
  • Automatic selection claims a claimable wallet of the requested type when the user owns none of that type. If the claim fails, sign-in fails; the SDK does not create a wallet instead.
  • result.claimableWallets on a completed sign-in lists the claimable wallets of every type that the sign-in did not claim. Claim one later with claimWallet.
  • selection.claimableWallets on a pending manual selection lists the claimable wallets of the requested type. selection.claimAndSelectWallet accepts only those IDs.
A rejected claim, for a wallet that is not allocated to the user’s verified email or was already claimed, rejects with OMSWalletError with code OMS_REQUEST_FAILED, status 404, and upstreamError.name 'AccountNotFound'. The active wallet and the pending selection are unchanged.