Skip to navigation

Native app integrations

Use this guide when a native iOS or Android app sends members to IDMe to sign in or verify their identity. Open IDMe in the system browser (iOS ASWebAuthenticationSession, Android Custom Tabs or Auth Tab), not in an embedded WebView.

The OAuth parameters, redirect URI, token exchange, and attribute retrieval are the same as a standard OAuth 2.0 Authorization Code integration. Only the way your app opens the authorization URL and receives the redirect is different.

Embedded WebViews are not supported

Don’t load IDMe in an Android WebView or iOS WKWebView. Embedded WebViews block or degrade features that members need to finish verification, including passkeys, camera access for document and selfie capture, and saved passwords. OAuth 2.0 for Native Apps (RFC 8252) also requires native apps to use an external user agent such as the system browser for OAuth flows.

Why the system browser

The system browser components are built for sign-in flows like IDMe’s. They run the browser engine outside your app’s process, so IDMe pages get full browser capabilities and your app never handles the member’s credentials.

CapabilitySystem browserEmbedded WebView
Passkeys and security keysSupported. The operating system shows its passkey prompt for id.me.Usually unavailable. Passkeys are bound to the IDMe domain, and your app can’t claim that domain.
Camera for document, selfie, and liveness captureSupported. The browser handles camera permission prompts.Your app must implement file choosers, camera permission handling, and permission recovery. Gaps cause blank screens, pickers that don’t open, and stuck sessions.
Saved passwords and autofillSupported through the member’s password manager.Limited or unavailable.
Existing IDMe sign-inCan reuse the member’s browser session, so returning members may not need to sign in again.Starts a fresh session every time.
Member trustThe member sees a trusted browser surface and can check the URL.The member can’t confirm they’re on IDMe, and the host app can read keystrokes, cookies, and page content.
App code to maintainA few lines, or an AppAuth library.JavaScript bridges, file chooser callbacks, camera permission logic, and URI grants per platform.

Common WebView issues

Integrations that load IDMe in an embedded WebView have run into these problems in production:

  • Passkey sign-in fails. The passkey prompt can’t finish inside the WebView. Members whose only sign-in method is a passkey can’t get in at all.
  • Camera access is blocked after the app grants it. Granting the app camera permission isn’t enough. The WebView also blocks the camera unless the host app implements onPermissionRequest on Android or requestMediaCapturePermissionFor on iOS. Members then see an error on the capture step.
  • Document upload does nothing on Android. The file input only works if the host app implements onShowFileChooser. These failures happen only in the WebView, so testing in Chrome won’t catch them.
  • The iOS capture screen breaks. Without inline media playback, the camera opens in the full-screen video player and hides the capture button. Some apps can only use the front camera, which can’t capture a document well.
  • Members can’t recover after denying the camera. WKWebView doesn’t keep a camera grant across page loads, so reloading the page to ask again doesn’t work. Members drop off during document capture and liveness checks at much higher rates in WebView-based browsers than in Safari.
  • Saved passwords don’t fill. Password managers and autofill are limited or unavailable, so members have to type credentials by hand.
  • The session is lost between contexts. Cookies in a WebView are separate from the browser. Flows that move between the app and the browser, such as a link sent by text message, can fail with “Something went wrong.”
  • The app doesn’t know when IDMe is done. IDMe can’t close your WebView. Your app has to intercept the redirect itself.
  • Layout and bot checks break in small viewports. Cookie banners can cover form fields, and bot-protection challenges can loop instead of completing.

The system browser avoids all of these because IDMe runs in the same browser the member already uses.

How it works

1

Build the authorization URL

Build a standard IDMe authorization URL with your client_id, redirect_uri, scope, state, and PKCE code_challenge. Use PKCE for every native app request. Never ship your client secret inside a mobile app. When you create your application in the developer portal, set Native/Mobile Application to Yes so IDMe accepts the token exchange without a client secret. For an existing application, contact your IDMe representative to turn this on.

2

Open the URL in the system browser

Open the authorization URL with ASWebAuthenticationSession on iOS or a Custom Tab or Auth Tab on Android. The member signs in, verifies, and grants consent on IDMe.

3

Receive the redirect

IDMe redirects to your redirect_uri. The operating system routes that redirect back to your app through a universal link or app link (recommended) or a custom URL scheme.

4

Exchange the code

Validate state, then exchange the authorization code and code_verifier for tokens, either from the app or through your backend. Retrieve attributes as you would in any other OAuth 2.0 integration.

Use AppAuth

The open-source AppAuth for iOS and AppAuth for Android libraries implement RFC 8252. They handle the system browser, PKCE, state validation, and the redirect for you.

Redirect URIs

Register every redirect URI your app uses in your IDMe application settings. See Redirect URIs.

  • Universal links (iOS) and app links (Android) use an https redirect URI on a domain you own, such as https://example.com/idme/callback. They are the most secure option because only your verified app can receive them.
  • Custom URL schemes, such as com.example.app:/idme/callback, are simpler to set up but can be claimed by other apps. If you use one, use a reverse-domain scheme and always use PKCE.

Platform guides

  • Android: Custom Tabs, Auth Tab, and app links.
  • iOS: ASWebAuthenticationSession and universal links.

Migrate from a WebView

If your app loads IDMe in a WebView today:

  1. Replace the WebView that loads the IDMe authorization URL with ASWebAuthenticationSession or a Custom Tab.
  2. Remove WebView-specific code for IDMe, including file chooser callbacks, camera permission bridges, and JavaScript interfaces.
  3. Move redirect handling from WebView navigation interception (shouldOverrideUrlLoading or decidePolicyFor) to universal link, app link, or custom scheme handling.
  4. Confirm your redirect URI is registered, and test the full flow on a physical device.

Your app doesn’t need its own camera permission or NSCameraUsageDescription entry for IDMe capture steps after migration. The browser asks the member for camera access.

Camera steps run in the system browser too

Earlier versions of this guide said to keep verification steps that use the camera in a WKWebView or Android WebView, and to grant camera access from the app with requestMediaCapturePermissionFor or onPermissionRequest. That guidance is replaced. Run the entire flow in the system browser, including document capture, selfie capture, liveness checks, and the in-page camera capture used by the IDMe Legal ID and face verification SDKs. Your app can’t grant camera access to web content in the system browser. The member grants it in the browser’s own camera prompt instead.

QA checklist

  • The authorization URL opens in the system browser, not in a WebView.
  • A member with a passkey can sign in with it.
  • Document capture, selfie capture, and liveness checks work on a physical device.
  • Denying camera access in the browser leaves the member on IDMe with guidance to retry.
  • The redirect returns to your app and is ignored if state doesn’t match.
  • Canceling or closing the browser returns the member to a recoverable screen in your app.
  • The token exchange uses PKCE, and the app doesn’t contain your client secret.

Questions about native app integrations? Contact mobile-sdk-issues@id.me.