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.
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.
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
onPermissionRequeston Android orrequestMediaCapturePermissionForon 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.
WKWebViewdoesn’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
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.
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.
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
httpsredirect URI on a domain you own, such ashttps://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
Migrate from a WebView
If your app loads IDMe in a WebView today:
- Replace the WebView that loads the IDMe authorization URL with
ASWebAuthenticationSessionor a Custom Tab. - Remove WebView-specific code for IDMe, including file chooser callbacks, camera permission bridges, and JavaScript interfaces.
- Move redirect handling from WebView navigation interception (
shouldOverrideUrlLoadingordecidePolicyFor) to universal link, app link, or custom scheme handling. - 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.
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
statedoesn’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.