> For the complete documentation index, see [llms.txt](https://docs.baas.sh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.baas.sh/baas-sdk/authentication/passkeys.md).

# Passkeys

Sign up a new user with a passkey, and sign in returning users.

Create an account with a passkey, then sign in with it. Each action opens its own browser prompt.

## Sign up

For a brand-new user, create a passkey:

```ts
const { address } = await baas.auth.signUpWithSmartWallet({ email: 'alice@example.com' });
//  → { address: '0x…' }
```

The browser asks the user to create a passkey, saved to iCloud Keychain, Google Password Manager, or another sync provider. On success, BaaS creates the account and returns its address. No session is opened: send the user to your sign-in step next.

## Sign in

Right after sign up, and for every returning user, open the session with the passkey:

```ts
const session = await baas.auth.signInWithSmartWallet({ email: 'alice@example.com' });
```

### Passkeys are bound to one domain

The RP ID is the domain a passkey was created under, configured in the Console under **Wallet Settings** before sign-up. A passkey is usable only from pages under that domain.

{% hint style="warning" %}
Sign-up requires a backed-up passkey from a compatible passkey manager. Browser and manager support varies. A device-bound or not-yet-backed-up passkey is refused with `PASSKEY_NOT_SYNCED`.
{% endhint %}

V1 does not expose passkey rotation or revocation through the SDK. Explain the backup requirement to your users; an email address alone is not an account-recovery method.

## Next

* [External wallet](/baas-sdk/authentication/external-wallet.md) — let users sign in with MetaMask, Rainbow, or any EIP-1193 wallet.
* [Sessions](/baas-sdk/authentication/sessions.md) — read the session, listen for changes, and sign out.
* [Troubleshooting](/baas-sdk/troubleshooting.md) — common pitfalls, including the sign up vs sign in mistake.
