← Builder
Builder guide

Privy Embedded Wallet Auth Builder Guide

Privy is a strong fit for teams that want to reduce wallet onboarding friction without removing wallet functionality from the product. Instead of forcing every new user through an extension-wallet install on day one, teams can start with familiar authentication methods and introduce embedded wallets progressively when the product actually needs them.

This guide covers where Privy fits, which architecture choices matter most, and what implementation details usually determine whether embedded wallet auth feels smooth or fragile in production.

Section

Why teams use Privy for embedded wallet auth

Embedded wallet infrastructure is rarely evaluated in isolation. Product teams are usually deciding how users should sign in, when wallets should appear in the experience, and how identity should be verified before sensitive actions happen.

Privy sits at the center of that decision because it combines authentication and wallet onboarding in a single system. For many teams, that is the difference between a crypto-native flow and a more consumer-ready flow.

  • login can begin with email, social login, SMS, or passkeys
  • embedded wallets can be created progressively instead of immediately
  • wallet onboarding can support both EVM and Solana workflows
  • client-visible auth state can be paired with server-side token verification

The user can enter through a familiar authentication path, then receive wallet functionality when the product actually needs it.

Section

Where Privy fits best

Privy is often the right choice when your product needs wallet-backed actions but the first-run experience cannot assume a fully crypto-native audience.

  • consumer crypto apps with mixed Web2 and Web3 audiences
  • products that want account creation before the first onchain action
  • apps that need progressive wallet onboarding instead of wallet-first onboarding
  • teams supporting both EVM and Solana in the same broader product strategy
  • flows that need server-side verification instead of trusting browser state alone

This is usually less about replacing wallets and more about deciding when wallet complexity should enter the user journey.

Section

The product decision behind progressive wallet onboarding

The key tradeoff is not whether embedded wallets exist. It is how much wallet complexity a new user sees before they understand the product value.

A wallet-first experience can still be right for strongly crypto-native audiences. But many product teams need a flow that gets users into the app quickly, delays wallet friction until it is necessary, preserves wallet-backed capability for later actions, and supports familiar recovery paths.

Progressive wallet onboarding matters because it lets teams separate identity entry from wallet creation. Users can sign in first, understand the product sooner, and receive wallet infrastructure when the application truly needs it.

Section

A practical Privy architecture

1. Client-side auth and onboarding

On the client, a typical implementation wraps the app in PrivyProviderwith the application ID and an explicit login configuration.

  • NEXT_PUBLIC_PRIVY_APP_ID
  • the login methods chosen for the product
  • an embedded wallet creation rule such as users-without-wallets
<PrivyProvider
  appId={process.env.NEXT_PUBLIC_PRIVY_APP_ID!}
  config={{
    loginMethods: ["email", "google", "wallet"],
    embeddedWallets: { createOnLogin: "users-without-wallets" },
  }}
>

This is where the product team decides what sign-in actually means for the app.

2. Wallet state and UX readiness

After setup, the app should read state through Privy hooks instead of relying on ad hoc client assumptions.

  • use usePrivy() for auth state
  • use useWallets() for wallet access
  • gate wallet-dependent UI on both readiness states

One of the main implementation gotchas is showing wallet-dependent UI before the auth layer and wallet layer are both ready.

3. Server-side identity verification

The browser can show who appears to be signed in, but it should not be the final source of truth for sensitive operations.

const client = new PrivyClient(appId, appSecret);
await client.verifyAuthToken(token);

That verification step helps separate interface state from trusted application state. It is especially important when an action depends on identity, wallet ownership, or access control.

Section

The onboarding flow most teams implement first

Step 1: decide how users enter

Choose login methods based on product and audience. Email, social login, SMS, and passkeys can all be valid entry points depending on how quickly users need to get into the app and what recovery expectations they bring.

Step 2: create wallets progressively

If the app needs wallets for downstream actions, progressive wallet creation often performs better than demanding wallet setup immediately.

embeddedWallets.createOnLogin = "users-without-wallets";

That pattern lets users start with a familiar authentication path and receive an embedded wallet if they do not already have one.

Step 3: wait for auth and wallet readiness

Before showing wallet-dependent UI, the app should confirm that both auth state and wallet state are ready.

const { ready: authReady } = usePrivy();
const { ready: walletsReady } = useWallets();

Without that readiness gate, products often show partial state too early and create confusing first-session errors.

Step 4: show the first useful wallet-backed action

Users should not land in a dead-end connected state. The next action should be obvious right away.

  • claim access to a gated feature
  • create or fund a wallet-backed account
  • sign a message to continue
  • start an EVM or Solana-specific flow
  • complete a purchase, mint, or account-setup action

Step 5: verify on the server before trusted actions

Before the app treats the session as authoritative for sensitive actions, verify the token server-side. That is the point where auth becomes application trust rather than a client-side display state.

Section

Architecture choices that affect the product experience

Embedded wallet first vs external wallet first

If your product expects newcomers, embedded wallets usually create a cleaner starting point. If the audience is strongly crypto-native, an external wallet path may still need to stay visible.

EVM only vs EVM and Solana

Privy can support both EVM and Solana flows, but teams should not assume a multi-chain experience is ready by default just because the broader auth flow is working.

Client-visible identity vs verified identity

Client hooks are enough to drive interface state. They are not enough to establish trust for sensitive backend actions on their own.

  • use client hooks for responsive interface state
  • use server verification for trusted operations
  • avoid treating browser-visible wallet state as a security boundary
Section

Common Privy implementation pitfalls

Showing wallet actions before readiness is complete

If wallet-dependent UI renders before both auth and wallet layers report ready, the first session can feel inconsistent even when the setup is mostly correct.

Trusting the browser wallet address by itself

A visible address is helpful for UI, but backend actions should not rely only on what the browser appears to show. Server-side token verification is the stronger pattern.

Forgetting that MFA can affect signing behavior

If your product includes embedded-wallet signing flows, MFA can change how those actions feel in the user journey and should be tested as part of real onboarding.

Assuming Solana support is automatic

Solana needs explicit enablement and validation. Teams planning wallet onboarding across ecosystems should test chain-specific behavior early.

Copying a web-first setup directly into native environments

Expo or React Native integrations often require a different package path and should not be treated as a drop-in clone of the web implementation.

Section

A builder checklist for Privy embedded wallet auth

Product and onboarding

  • 01decide which login methods belong in the first-run flow
  • 01define when embedded wallets should be created
  • 01make the first post-login action obvious
  • 01keep the user moving toward a concrete wallet-backed task

Frontend implementation

  • 01wrap the app in PrivyProvider
  • 01configure NEXT_PUBLIC_PRIVY_APP_ID
  • 01set login methods intentionally
  • 01gate UI on both auth and wallet readiness

Backend trust model

  • 01store PRIVY_APP_SECRET server-side only
  • 01verify auth tokens on the server
  • 01avoid treating browser-visible wallet state as final authority
  • 01separate UX convenience from trusted identity checks

Chain coverage

  • 01validate EVM behavior in the actual app flow
  • 01enable and test Solana explicitly if required
  • 01confirm chain-specific wallet actions in real user journeys
  • 01check first-run behavior with the exact wallet mix users will see
Section

How Privy compares with a standard wallet connection flow

A standard wallet connection flow often starts by asking the user to connect an external wallet before any product value is clear. That works for strongly crypto-native audiences, but it can create friction for broader consumer products.

Privy changes that by making auth and wallet onboarding part of the same product system: login can begin with familiar identity methods, wallet creation can happen progressively, and the app can move users toward an onchain action only after they understand what they are unlocking.

Section

How web3.new helps builders evaluate Privy faster

web3.new is designed for teams moving from protocol discovery into implementation planning. Instead of treating a protocol listing as the end of research, builders can use it as the start of a more actionable integration workflow.

  • compare protocol-level references before writing implementation prompts
  • translate auth and wallet decisions into a builder-facing page model
  • connect protocol research with concrete product onboarding choices
  • move from discovery into architecture planning faster

If you want the protocol reference first, start with the Privy protocol page. If you are ready to shape a broader implementation prompt around your application, continue into the builder.

Section

FAQ

What is Privy used for in wallet onboarding?

Privy helps teams combine familiar authentication methods with progressive embedded wallet creation, so users can start with email, social login, SMS, or passkeys before wallet-backed actions are required.

When should a team choose Privy over a wallet-first flow?

Privy is often a better fit when the product serves mixed Web2 and Web3 audiences, needs lower-friction account entry, or wants wallet functionality to appear later in the journey instead of on the first screen.

What setup values matter first in a typical Privy integration?

A common starting point is NEXT_PUBLIC_PRIVY_APP_ID on the client and PRIVY_APP_SECRET on the server, plus an explicit login-method configuration and an embedded-wallet creation rule that matches the onboarding strategy.

Why is server-side token verification important?

Client hooks are useful for interface state, but trusted actions should verify the auth token on the server so browser-visible wallet state is not treated as the final source of truth.

Can Privy support both EVM and Solana wallet journeys?

Yes, but teams should enable and test Solana behavior intentionally instead of assuming a multi-chain experience is production ready by default.

What is a common integration mistake with embedded wallet auth?

One common mistake is showing wallet-dependent UI before both auth state and wallet state are ready, which can make the first-run experience feel broken even when the underlying setup is mostly correct.

Next step

Start with the protocol reference, then shape the right onboarding flow

Strong Privy integrations come from getting a few fundamentals right early: the authentication entry point, progressive wallet creation rules, readiness gating, server-side verification, and chain-specific testing for the real product journey.