diff --git a/apps/portal/src/app/connect/in-app-wallet/guides/link-multiple-profiles/page.mdx b/apps/portal/src/app/connect/in-app-wallet/guides/link-multiple-profiles/page.mdx index cebb521998d..d7638408a8c 100644 --- a/apps/portal/src/app/connect/in-app-wallet/guides/link-multiple-profiles/page.mdx +++ b/apps/portal/src/app/connect/in-app-wallet/guides/link-multiple-profiles/page.mdx @@ -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` | diff --git a/apps/portal/src/app/connect/in-app-wallet/guides/retrieve-linked-profiles/page.mdx b/apps/portal/src/app/connect/in-app-wallet/guides/retrieve-linked-profiles/page.mdx index 9b6f4a1fa20..686ca740cbc 100644 --- a/apps/portal/src/app/connect/in-app-wallet/guides/retrieve-linked-profiles/page.mdx +++ b/apps/portal/src/app/connect/in-app-wallet/guides/retrieve-linked-profiles/page.mdx @@ -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` | diff --git a/apps/portal/src/app/connect/sidebar.tsx b/apps/portal/src/app/connect/sidebar.tsx index f300bbc200f..4d47722ab49 100644 --- a/apps/portal/src/app/connect/sidebar.tsx +++ b/apps/portal/src/app/connect/sidebar.tsx @@ -132,6 +132,10 @@ export const sidebar: SideBar = { name: "External Wallets", href: `${connectSlug}/methods/external-wallets`, }, + { + name: "Guest Mode", + href: `${connectSlug}/methods/guest-mode`, + }, ], }, { diff --git a/apps/portal/src/app/connect/sign-in/methods/guest-mode/page.mdx b/apps/portal/src/app/connect/sign-in/methods/guest-mode/page.mdx new file mode 100644 index 00000000000..8beaf4d819a --- /dev/null +++ b/apps/portal/src/app/connect/sign-in/methods/guest-mode/page.mdx @@ -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"; + +; +``` + +You can try out Guest Mode [on our playground.](https://playground.thirdweb.com/connect/sign-in/button)