# How do I add web3 login without a connect wallet button?

> Inside Cherry, users open your web app already signed in: your backend verifies a signed launch token. No connect button, no login signature, free listing.


To add web3 login without a connect wallet button, let a wallet sign the user in before your app loads. List your web app as a mini-app on Cherry.fun at [portal.cherry.fun](https://portal.cherry.fun), for free and with no review queue, and Cherry hands your app a signed launch token each time someone opens it: your backend verifies the token, and the user never sees a wallet picker or a sign-in signature.

What you win is the first screen. People open your app from inside [Cherry](https://cherry.fun/learn/features/cherry-wallet/), where they signed in once with Google, Apple, X or Telegram, so the first thing they see is your product, with no wallet picker in the way. Six steps replace the button with a launch token.

## Why apps show a connect wallet button today

A standalone dapp does not know who is visiting, so it asks. The user picks a wallet from a list, approves the connection, and often signs a message so your server can trust the address. The common toolkits package that flow:

| Approach | What the user does | What you build |
|---|---|---|
| [Solana Wallet Adapter](https://github.com/anza-xyz/wallet-adapter/blob/master/APP.md) | Taps the button, picks a wallet in a modal, approves | Wallet providers, the modal provider and the `WalletMultiButton` component |
| [Reown AppKit](https://docs.reown.com/appkit/javascript/core/components) | Taps the button, picks a wallet in the AppKit modal | The `<appkit-button />` or `<appkit-connect-button />` web component and its config |
| [Sign In With Solana](https://github.com/phantom/sign-in-with-solana) | Approves one sign-in request that connects and signs at once | A `signIn` call, with a fallback to connect plus `signMessage` for wallets without it |
| [Sign-In with Ethereum (EIP-4361)](https://eips.ethereum.org/EIPS/eip-4361) | Signs a plain-text message naming your domain, their address and a nonce | Nonce handling, message parsing and signature checks on your server |
| Cherry mini-app | Taps your app inside Cherry | The SDK provider, a backend check of the launch token, a framing header and a domain proof file |

All four work, and your own site can keep them. Each puts a wallet picker or a signature request between the visitor and your app, and most expect the visitor to arrive with a wallet already set up. Inside a wallet that has already signed the user in, that identity can be handed to your app instead.

## Before you start

- A web app deployed over https. A staging address is fine while you test.
- A backend, if your app acts on who the user is. A static app can render the user's name from the SDK, but must not move funds or grant anything on that alone.
- A Solana stack: `@solana/web3.js` with the wallet adapter, or `@solana/kit`. Mini-apps ask users to sign Solana transactions only, today.
- A free account at [portal.cherry.fun](https://portal.cherry.fun).

## Step 1: Register the app and copy the agent brief

Open the listing wizard in Cherry Portal ([how free listing works](https://cherry.fun/learn/features/list-a-mini-app-for-free/)) and fill in the first step: name, a one-line pitch, a category, an icon and a cover. You get an app ID, which becomes the audience of every launch token your app receives.

When you reach the integration step, the wizard writes a brief for your AI coding agent, filled in with your app ID and origin. Paste it into Claude Code, Cursor or Codex in your app's repository, and the agent handles steps 2 to 5 and the domain proof file, then sends you back to the wizard to run the checks and publish ([Build with an AI agent](https://portal.cherry.fun/docs/mini-apps/ai-agents)).

## Step 2: Let Cherry frame your app

Cherry loads your app in a frame. Send this header with every HTML response and remove `X-Frame-Options` if you set it:

```http
Content-Security-Policy: frame-ancestors 'self' https://chat.cherry.fun https://cherry.fun https://*.cherry.fun
```

To test it, open your staging address inside the private test room the wizard gives your team.

## Step 3: Sign the user in from the launch token

Install the SDK and wrap your app in the provider. Inside Cherry, the user is signed in before your app loads; the provider reports it as soon as the handshake completes:

```bash
npm install @cherrydotfun/miniapp-sdk@^0.1.24 @solana/web3.js @solana/wallet-adapter-base
```

```tsx
import { CherryMiniAppProvider, useCherryMiniApp } from '@cherrydotfun/miniapp-sdk/react';

export function Root() {
  return (
    <CherryMiniAppProvider>
      <App />
    </CherryMiniAppProvider>
  );
}

function App() {
  const { isReady, user, launchToken } = useCherryMiniApp();
  if (!isReady) return <Splash />;
  // Send launchToken to your backend once and get your own session back.
  return <Home name={user.displayName} wallet={user.publicKey} />;
}
```

Hide your existing wallet button when the app runs inside Cherry; the [troubleshooting docs](https://portal.cherry.fun/docs/mini-apps/troubleshooting) use `isInsideCherry()` for that check. In a normal browser tab the SDK never reports a launch token, so your usual login keeps working there. If your own name shows up in the test room without a tap, sign-in works.

## Step 4: Verify the token on your backend

The launch token is a short-lived JWT signed by Cherry. It says who the user is and which app and room they opened, and it expires after five minutes. Send it to your backend once and verify it there:

```ts
import { verifyLaunchToken } from '@cherrydotfun/miniapp-sdk';

const APP_ID = 'YOUR_APP_ID';

export async function signInWithCherry(token: string) {
  const claims = await verifyLaunchToken(token, { appId: APP_ID });
  const userId = claims.cherry_id ?? claims.sub; // key your users by this
  return { userId, wallet: claims.sub };
}
```

`verifyLaunchToken` checks the signature against Cherry's keys, plus the issuer, audience, expiry and app ID. Three rules from the [Authentication docs](https://portal.cherry.fun/docs/mini-apps/authentication), which also carry Python and Go versions:

- **Key users by the Cherry account ID** (`cherry_id`). `sub` is the user's Solana wallet, and it changes when they pick another wallet to pay with.
- **Start your own session right away**, keep it in memory and send it in an `Authorization` header. Browsers drop third-party cookies inside frames.
- **Trust only the verified token.** Query parameters and messages from the page are unsigned.

Your backend should answer 401 or 403 to a token issued for another app and to an expired one. The automated test tries both.

## Step 5: Connect the wallet without asking

Register the Cherry adapter with `autoConnect`, and the wallet is connected the moment your app opens:

```tsx
import { CherryWalletAdapter } from '@cherrydotfun/miniapp-sdk/solana';

const wallets = [new CherryWalletAdapter()];
// <WalletProvider wallets={wallets} autoConnect>…</WalletProvider>
```

Your app never gets the keys. They stay on the user's device; when you ask for a signature, Cherry checks the request against your app's limits and shows it to the user, who approves or declines. `signMessage` still exists, but never for logging in. Plan around the limits in [Wallet and limits](https://portal.cherry.fun/docs/mini-apps/wallet):

- Transactions are on Solana. Your audience holds wallets on four chains, but requests for other chains are refused.
- A new listing is Unverified: up to $50 per transaction and $50 per wallet per day. One identity check of the project owner raises that to $1,000 and $5,000.
- Token approvals and recurring subscriptions are refused for Unverified and Verified apps, so sell items, passes or access.

Funding is the wallet's job too. Users buy crypto inside Cherry with a card, Apple Pay, Google Pay or PayPal before they open your app, so you build no on-ramp and no sign-up form.

## Step 6: Prove your domain and publish

Serve a small file on every origin your app uses, at `/.well-known/cherry-app.json`, over https with a 200:

```json
{ "appId": "YOUR_APP_ID" }
```

Then run the automated checks and the automated test in the wizard. The test opens your app inside Cherry in a real phone-sized browser, signed in as a test user, and fails if a connect-wallet button or link, in any language, or a signature request appears within 15 seconds ([Listing and publishing](https://portal.cherry.fun/docs/mini-apps/listing)).

When everything passes, publish. The app is listed at once, free and with no review queue, and it opens inside Cherry on iPhone, Android, the Solana Seeker and the web. App Store, Google Play and Solana dApp Store users reach it through Cherry's own store listings, already signed in from the first tap. If the app does well, a voluntary tip to Cherry is welcome. The app is live.

## Troubleshooting

- **The app opens on its own login screen inside Cherry.** It ignores the launch token. Sign in from the token when inside Cherry and keep your login screen for the open web.
- **Signed in, then logged out on the next request.** The session lives in a cookie, which the frame drops. Move it to an `Authorization` header.
- **The backend rejects every token.** Set the audience to your app ID and the issuer to `https://chat.cherry.fun`, and allow a few seconds of clock leeway.
- **Users lose their account after switching wallets.** Your backend keys them by `sub`. Use `cherry_id ?? sub`.
- **The connect check fails.** A connect or select-wallet button is still visible, or the app signs a message to log in.

## Related guides

- [Do I need an embedded wallet for my app?](https://cherry.fun/learn/guides/embedded-wallet/) weighs wallet SDKs against a host wallet.
- [WalletConnect alternatives](https://cherry.fun/learn/compare/walletconnect-alternatives/) compares connect toolkits for apps that run on their own.
- [Can a Telegram mini app use a Solana or Base wallet?](https://cherry.fun/learn/guides/telegram-mini-app-wallet/) covers Telegram's wallet rules.
- [How to build a mini app](https://cherry.fun/learn/guides/how-to-build-a-mini-app/) walks through turning an existing web app into one.
- [How to accept Solana payments](https://cherry.fun/learn/guides/accept-solana-payments/) picks up where sign-in ends.

Get Cherry on [iPhone](https://apps.apple.com/app/cherry-fun-solana-messenger/id6749173799), [Android](https://play.google.com/store/apps/details?id=fun.cherry) or [the web](https://chat.cherry.fun) to open your test room from the user's side.

## FAQ

### Do I still need Sign In With Solana or Sign-In with Ethereum inside Cherry?

No. The launch token already proves who the user is and which wallet they hold, so a login signature adds nothing, and Cherry's automated test fails an app that asks for one. Keep message signing for actions that need it, never for logging in.

### Can I keep my connect wallet button on my own website?

Yes. Outside Cherry the SDK never reports a launch token, so your site keeps its normal login and wallet button. Hide the button only when the app runs inside Cherry, and the same codebase serves both.

### What happens when a user switches wallets inside Cherry?

Your app receives a new launch token. Treat it as a new sign-in for the same person: the Cherry account ID stays the same and the wallet address changes, which is why the docs tell you to key users by that account ID.

### How long is a Cherry launch token valid?

Five minutes, and each token has a unique ID. Exchange it once for your own session, keep that session in memory and send it in an Authorization header.

### Is listing a mini-app on Cherry free?

Yes. You list the app yourself at portal.cherry.fun for free, with no review queue, and it goes live as soon as the automated checks and test pass. A new listing starts with lower transaction limits until the project owner completes one identity check.

## Sources

- [Cherry Portal](https://portal.cherry.fun)
- [Cherry docs: Mini apps overview](https://portal.cherry.fun/docs/mini-apps)
- [Cherry docs: Mini-app Quickstart](https://portal.cherry.fun/docs/mini-apps/quickstart)
- [Cherry docs: Authentication](https://portal.cherry.fun/docs/mini-apps/authentication)
- [Cherry docs: Wallet and limits](https://portal.cherry.fun/docs/mini-apps/wallet)
- [Cherry docs: Listing and publishing](https://portal.cherry.fun/docs/mini-apps/listing)
- [Cherry docs: Build with an AI agent](https://portal.cherry.fun/docs/mini-apps/ai-agents)
- [Cherry docs: Troubleshooting](https://portal.cherry.fun/docs/mini-apps/troubleshooting)
- [Solana Wallet Adapter: app setup guide](https://github.com/anza-xyz/wallet-adapter/blob/master/APP.md)
- [Reown AppKit: web components](https://docs.reown.com/appkit/javascript/core/components)
- [Sign In With Solana (Phantom)](https://github.com/phantom/sign-in-with-solana)
- [EIP-4361: Sign-In with Ethereum](https://eips.ethereum.org/EIPS/eip-4361)

