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. The requested credential lifetime defaults to one week. Set sessionLifetimeSeconds to an integer from 1 through 2,592,000 seconds when you need another lifetime.

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. The same walletSelection option is available for ID-token and redirect authentication.