Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Note that the `email` field above will differ based on the profile type. We list

| Strategy | Type | `details` Field |
| ------------- | ----------------- | --------------- |
| Guest | `"guest"` | `id` |
| Email | `"email"` | `email` |
| Phone | `"phone"` | `phone` |
| Passkey | `"passkey"` | `id` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Note that the `email` field above will differ based on the profile type. We list

| Strategy | Type | `details` Field |
| ------------- | ----------------- | --------------- |
| Guest | `"guest"` | `id` |
| Email | `"email"` | `email` |
| Phone | `"phone"` | `phone` |
| Passkey | `"passkey"` | `id` |
Expand Down
4 changes: 4 additions & 0 deletions apps/portal/src/app/connect/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ export const sidebar: SideBar = {
name: "External Wallets",
href: `${connectSlug}/methods/external-wallets`,
},
{
name: "Guest Mode",
href: `${connectSlug}/methods/guest-mode`,
},
],
},
{
Expand Down
58 changes: 58 additions & 0 deletions apps/portal/src/app/connect/sign-in/methods/guest-mode/page.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { createMetadata } from "@doc";

export const metadata = createMetadata({
image: {
title: "Guest Mode",
icon: "wallets",
},
title: "Guest Mode",
description:
"Learn how to get users started in your app without requiring sign-in.",
});

# 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`

```tsx
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](/connect/in-app-wallet/guides/link-multiple-profiles) so they can access their account in the future.

```tsx
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`

```tsx
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.](https://playground.thirdweb.com/connect/sign-in/button)