In Studio
Users & auth → Sign-in → Sign-in & registration → Ways to sign in → Guest sign-in. Let someone start with no details and become a real account later. A guest nobody has used for 30 days is removed.Start a guest session
Upgrade to an account
When they sign up, attach the email to the same user. Everything the guest created stays theirs.verification_sent) and the upgrade is complete once they click it. The user.upgraded auth webhook event fires.
Know if someone is a guest
A guest has no email. Use that to decide what to show:isGuest is true.
Limit what guests can do
Guests are real users, so they can do everything a signed-in user can unless your access rules say otherwise. For sensitive actions (inviting others, exporting data, paying) require a confirmed email in the rule: $auth.email is set.Clean-up
A guest unused for 30 days is removed automatically, together with their sessions. Anything you stored against their id should tolerate that, or be tied to the upgraded account first.A cart that survives sign-up
- Visitor adds an item: call
signInAnonymously()once, then writecart_itemswithowner_id = user.id. - Visitor checks out: call
upgradeAnonymous({ email, password }). - The cart records still belong to the same id. No migration.
Email and password
The account guests upgrade to.
Access rules
Restrict what guests can do.