Guest Mode

Sometimes users want to get started using your app without signing in. You can now give users an in-memory "guest account" that can then be converted into a standard account by linking another auth method.

With inAppWallet

import { inAppWallet } from "thirdweb/wallets";
const wallet = inAppWallet();
// Create the temporary guest account
const account = await wallet.connect({
client,
strategy: "guest",
});

When your user is ready, link any other auth method so they can access their account in the future.

import { linkProfile } from "thirdweb/wallets";
await linkProfile(wallet, { strategy: "google" });

Your user can now access this same wallet with their Google account. Until the user links another profile to the wallet, it will be stored in memory and last until they clear their browser cookies or connect a different wallet.

With ConnectButton

import { ConnectButton } from "thirdweb/react";
import { inAppWallet } from "thirdweb/wallets";
<ConnectButton
wallets={[
inAppWallet({
auth: {
options: [
"google",
"discord",
"telegram",
"email",
"phone",
"guest",
],
},
}),
]}
/>;

You can try out Guest Mode on our playground.