authenticateWithEmailOrPhone(), which handles the entire auth flow in a single call.
You are responsible for opening the portal URLs that Para generates during authentication. Use
para.onStatePhaseChange() to listen for these URLs and open them in the device browser. See Handling Portal URLs below.Sign-in doesn’t say whether an email or phone has an account until the user enters the code. Every email or phone sign-in starts on a Para-hosted page that sends and checks the code, then signs the user in or creates their account. A returning password or PIN user finishes on the same page. A returning passkey user is handed back to your app to use the passkey on this device.
This guide uses the current sign-in flow. Set
supportsAuthV2: true in the ParaMobile options (requires @getpara/react-native-wallet 3.23.0 or later): new ParaMobile(env, apiKey, undefined, { supportsAuthV2: true }). If you also use ParaProvider, pass this client with paraClientConfig={para}. Passing a config object instead makes ParaProvider create a second client, so its hooks and your listener would track different sign-ins. For apps that can’t set it yet, see Apps without supportsAuthV2.Prerequisites
Before implementing authentication, ensure you have completed the basic Para setup for your React Native or Expo application.Email / Phone Authentication
Usepara.authenticateWithEmailOrPhone() to authenticate a user by email or phone. The method handles the complete flow: determining whether the user is new or returning, session polling, and wallet creation. Combine it with the state listener below to open the Para-hosted pages and run native passkey steps.
{ phone: '+1234567890' } instead of { email }:
Handling Portal URLs
During authentication, Para’s state machine emits portal URLs that the user must interact with (e.g. entering a verification code, creating a passkey, or entering a password). Since you’re building a custom UI, you need to subscribe to state changes and open these URLs using the in-app browser. Usepara.onStatePhaseChange() to receive a StateSnapshot containing authStateInfo — a flat object with all the URLs and flags you need:
- React Native
- Expo
- Code:
verificationUrlis the hosted code page for every email or phone sign-in. Open it with yournativeCallbackUrlso the page can return to your app. - New account: once the code proves the email or phone, a new account sets up its credential. For a passkey,
isCredentialSetupistrueandpasskeyIdis set: callregisterPasskey(passkeyId). For a password or PIN, openpasswordUrlorpinUrl. - Returning passkey account: the hosted page hands the step back to your app and
onPasskeyLoginRequired()fires. Close the in-app browser and callloginWithPasskey(). The pendingauthenticateWithEmailOrPhone()call then resolves.
Apps without supportsAuthV2
If your app can’t set supportsAuthV2 yet, the earlier sign-in flow keeps working. Every email or phone sign-in still starts on the hosted code page at verificationUrl. Open it with your nativeCallbackUrl as above; a returning password or PIN user finishes there.
onPasskeyLoginRequired() doesn’t fire on this flow. Instead, a returning passkey account comes back to your nativeCallbackUrl with status=PASSKEY_REQUIRED. Read that from the browser result and call para.loginWithPasskey():
The passkey hand-back on this flow needs the
@getpara/react-native-wallet release that includes this hand-back.authStateInfo Fields
authStateInfo carries the Para-hosted page URLs for the current step, plus flags that tell your UI what that step is. On the web, open a page in a popup or an iframe (passkey pages need a popup). In a mobile app, open it in an in-app browser. Each …FullUrl field is the unshortened form of its URL; the two match unless you pass useShortUrls.
Email and phone sign-in no longer reaches
authPhase 'awaiting_account_verification': every sign-in starts on the hosted code page at verificationUrl. If your app still handles this phase, show a code input field and call para.verifyNewAccount({ verificationCode }). It can resolve for a new or a returning account. To send a new code, call para.resendVerificationCode({ type: 'SIGNUP' }).State Phase Reference
TheStateSnapshot returned by para.onStatePhaseChange() contains three phase fields that tell you where in the flow the user is. Use these to drive your UI.
corePhase — Top-Level Lifecycle
authPhase — Authentication Flow Detail
These phases run on Para’s updated authentication flow, for every sign-in method:
Earlier flow phases (React Native apps without supportsAuthV2)
Earlier flow phases (React Native apps without supportsAuthV2)
React Native apps that haven’t set
supportsAuthV2 run the earlier flow. Its phases replace authenticating_v2 and processing_authentication_v2:External wallet phases
External wallet phases
loginExternalWallet with a single wallet signs in through authenticating_v2 and awaiting_session_start, like the other methods, with authStateInfo.externalWalletUrl set. Connection-only wallets (and connectExternalWallet) skip the Para-hosted page and use these phases:Para-hosted pages: On Para’s updated authentication flow, every step that collects a code, credential, or signature runs on a Para-hosted page. Your UI opens the URL from
authStateInfo and waits; the sign-in call resolves when the user finishes. Every email or phone sign-in starts with the code, for new and returning users alike, and a returning passkey, password, or PIN user proves that credential after the code. If the user also has to set up their first passkey, password, or PIN, isCredentialSetup turns true and the matching creation URLs appear.walletPhase — Wallet Setup Detail
Method Reference
This method must be paired with
para.onStatePhaseChange() to open the Para-hosted pages that appear during authentication: the code page (verificationUrl), a returning user’s passkey page, and, for a new account, the passkey, password, or PIN creation pages. See the guide for your platform for the full state listener pattern.Cancelling Authentication
To end a pending sign-in, for example when the user closes the in-app browser without finishing or taps your own “Cancel” button, callpara.cancelAuthFlow(). It returns the auth flow to unauthenticated, and the pending authenticateWithEmailOrPhone call rejects.
You can also stop waiting with sessionPollingCallbacks.isCanceled. Return true from it to stop the session polling loop, and the optional onCancel callback fires:
para.logout() also cancels all active polling, resets the state phases back to unauthenticated, and clears the stored session.