# Guest Mode

Guest mode authenticates a user and provisions an embedded wallet **without any credentials** — no email, no password, no social login. It's the fastest possible onboarding: the user taps once and can immediately hold assets and sign transactions. Later, prompt them to add a real identity (email, social, or wallet) to make the account permanent and recoverable across devices.

Use guest mode when you want users to experience your app before committing to a sign-up.

:::warning
A guest account lives only on the device until it's upgraded. A guest's wallet and data **cannot be merged into an existing account** — guests can only be upgraded into a *new* account. If a guest wants to log in with an account they already have, sign the guest out first (which discards the guest wallet).
:::

## Create a guest account

`signUpGuest()` takes no parameters and returns an [`OFAuthResponse`](/docs/products/embedded-wallet/authentication#response-types).

```swift
import SwiftUI
import OpenfortSwift

struct GuestButton: View {
    @State private var status = ""

    var body: some View {
        VStack {
            Button("Continue as guest") {
                Task { await signUpGuest() }
            }
            Text(status).font(.footnote)
        }
    }

    func signUpGuest() async {
        do {
            _ = try await OFSDK.shared.signUpGuest()
            status = "Guest session started."
        } catch {
            status = "Couldn't start guest session: \(error.localizedDescription)"
        }
    }
}
```

:::note
Make sure the SDK is ready before calling `signUpGuest()` — `await OFSDK.shared.waitUntilReady()` after [initialization](/docs/products/embedded-wallet/swift).
:::

## Upgrade a guest to a permanent account

While the guest is signed in, link a real identity. Once linked, the same embedded wallet carries over to the permanent account:

* **Email / password** — [`signUpWithEmailPassword`](/docs/products/embedded-wallet/swift/auth/email)
* **Social login** — [`initOAuth`](/docs/products/embedded-wallet/swift/auth/oauth) or [Sign in with Apple](/docs/products/embedded-wallet/swift/auth/sign-in-with-apple)
* **External wallet** — [SIWE](/docs/products/embedded-wallet/swift/auth/external-wallet)

## Next steps

* [Configure the embedded wallet](/docs/products/embedded-wallet/swift/wallet/recovery) so the guest can sign transactions
* Read about [user sessions](/docs/products/embedded-wallet/swift/auth/user-session)
