Skip to main content
Card prebuilt components ship in the Privy React SDK. iOS and Android apps open a hosted copy of that experience in a WebView. Host the page from the React integration on a domain in the app’s allowed origins. Use the same Privy app ID as the mobile app. The WebView has its own Privy session so the user signs in on the hosted page.

How it works

  1. The user opens cards in the native app.
  2. The app loads the hosted React page in a WebView.
  3. The user signs in on that page when the WebView has no Privy session.
  4. The page runs card signup and displays the card summary.

Render the card views

For the best experience, render the card views full screen in the WebView.
Host the page on HTTPS. Add that origin in the Privy Dashboard before the WebView loads it.

Handling window popups

Card signup calls window.open for provider terms and identity verification. Return that window to the page, and release it on close so the page can read closed.

Open the hosted page

The app loads the hosted React page in the WebView. On Android, enable JavaScript, DOM storage, and third-party cookies, and match the parent height so the cards layout keeps its size.

Handling webview permissions

Identity verification uses the camera and microphone. Declare that access, then grant the capture request to the WebView.
Add these keys to Info.plist.

Complete example