> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getpara.com/llms.txt
> Use this file to discover all available pages before exploring further.

# External Wallet Login

> Sign users in to Para with an external wallet your React Native or Expo app connects, proving ownership with a signature.

Users can sign in to Para with an external wallet they already have, such as one your app connects through WalletConnect or the Solana Mobile Wallet Adapter. Your app connects the wallet and signs with it. Para verifies the signature and signs the user in.

This guide covers:

* Connection-only vs. sign-in
* Sign-in on Para's updated authentication flow with `loginExternalWallet` and `completeExternalWalletLogin`
* Sign-in without the opt-in, with `loginExternalWallet` and `verifyExternalWallet`

## Prerequisites

<picture>![Email & Phone Login](https://docs.getpara.com/images/v3/custom-ui-social.png)</picture>

## [Email & Phone Login](https://docs.getpara.com/v3/react-native/guides/add-email-phone.md)

Set up the client and opt in to the updated authentication flow.

## Connection-only vs. Sign-in

There are two ways to tell Para about an external wallet:

* **Connection-only.** Pass `isConnectionOnly: true` in the `externalWallet`. Para records the connected address for the session without signing the user in to a Para account. No signature is needed.
* **Sign-in.** The user signs in to a Para account with the wallet. The wallet proves it controls the address by signing a sign-in message. On Para's updated authentication flow this is a verify-only sign-in: Para doesn't create an embedded Para wallet for the user, and the external wallet stays the user's wallet.

## Sign In on the Updated Authentication Flow (Recommended)

We recommend opting in to Para's updated authentication flow with the `supportsAuthV2` option; it becomes the default in the next major version. Requires `@getpara/react-native-wallet` 3.23.0 or later. Once your app opts in (see [Email & Phone Login](https://docs.getpara.com/v3/react-native/guides/add-email-phone.md#opt-in-to-the-updated-authentication-flow-recommended)), sign-in takes two calls:

1. `loginExternalWallet({ externalWallet, uri })` opens the sign-in. Pass `uri`, your app's https origin (for example `"https://yourapp.com"`). Its domain is what the wallet shows the user in the sign-in message. On the updated flow the call throws without it, because a React Native app has no page origin to fall back on.
2. `completeExternalWalletLogin({ signMessage, sessionPollingCallbacks })` asks your `signMessage` callback to sign the sign-in message with the same wallet, verifies the signature, and resolves once the user is signed in. It returns the same `AuthenticateResponse` as `authenticateWithEmailOrPhone`.

Once the signature is verified the user is signed in. This is the same for new and returning accounts: no passkey, password, or Para-hosted page is involved. The session proves control of the external wallet only, so it can't sign with any embedded Para wallets the account already has.

Para decides which sign-in experience runs for your app, so build for both. Without the opt-in, `loginExternalWallet` returns an auth state with a `stage`, and you finish with `verifyExternalWallet` as shown in the next section. The example below handles both.

```typescript externalWalletLogin.ts theme={null}
import { para } from "../your-para-client";

// Signs a message with the connected wallet (for example your WalletConnect session)
type SignWithWallet = (message: string) => Promise<string>;

export async function signInWithExternalWallet(address: string, signWithWallet: SignWithWallet) {
  const externalWallet = { address, type: "EVM" as const, provider: "metamask" };

  const state = await para.loginExternalWallet({
    externalWallet,
    uri: "https://yourapp.com", // Your app's https origin
  });

  if (state.stage) {
    // Without the opt-in: sign the verification message, then verify it
    const signedMessage = await signWithWallet(state.signatureVerificationMessage!);
    return para.verifyExternalWallet({ externalWallet, signedMessage });
  }

  // Para's updated authentication flow
  return para.completeExternalWalletLogin({ signMessage: signWithWallet });
}
```

Keep these in mind:

* **`signMessage` must sign with the same wallet** you passed to `loginExternalWallet`. Throw from it to cancel sign-in. For Cosmos wallets, return `{ signature, cosmosSigner, cosmosPublicKeyHex }` instead of a string.
* **A new user has no embedded Para wallet.** A verify-only sign-in creates no Para wallet shares. Sign transactions with the external wallet.
* **Failures reset the sign-in.** If `completeExternalWalletLogin` throws, it cancels the pending sign-in, so the next attempt starts with `loginExternalWallet` again.
* **Don't set `withFullParaAuth`.** On the updated flow, `loginExternalWallet` rejects a wallet that sets it with `Full-auth external wallet sign-in is not supported on React Native auth v2`, before the wallet signs anything.
* **Connection-only wallets don't use it.** `loginExternalWallet` connects a connection-only wallet without a Para login, as before, and there's nothing to complete.
* **Use `completeExternalWalletLogin`, not `verifyExternalWallet`,** on the updated flow. `verifyExternalWallet` throws while an updated-flow sign-in is waiting for its signature.

## Sign In Without the Opt-In

Without the opt-in, sign-in with an external wallet keeps working unchanged:

1. Call `loginExternalWallet({ externalWallet })`. It returns an auth state with the message to sign in `signatureVerificationMessage`.
2. Sign that message with the wallet.
3. Call `verifyExternalWallet({ externalWallet, signedMessage })` to finish.

The [useLoginExternalWallet](https://docs.getpara.com/v3/react-native/guides/hooks/use-login-external-wallet.md) and [useVerifyExternalWallet](https://docs.getpara.com/v3/react-native/guides/hooks/use-verify-external-wallet.md) hooks wrap these calls.

## Next Steps

<picture>![Add Social Login](https://docs.getpara.com/images/v3/custom-ui-social.png)</picture>

## [Add Social Login](https://docs.getpara.com/v3/react-native/guides/add-social-login.md)

Authenticate users with Google, Apple, Discord, and more.

<picture>![Session Management](https://docs.getpara.com/images/v3/general-sessions.png)</picture>

## [Session Management](https://docs.getpara.com/v3/react-native/guides/sessions.md)

Manage user sessions and token refresh.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.