> 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/external-wallet.md).

# External wallet

Pair BaaS with a wallet the user already has, such as MetaMask, Rainbow, or Coinbase Wallet. Their existing address becomes the BaaS account.

## Sign up

With external wallets, sign up happens automatically on the first sign-in. The wallet is the account, so the same `signInWithWallet()` call covers both first-time and returning users.

## Sign in

Pass an EIP-1193 provider such as `window.ethereum`, or a connector's provider from wagmi.

```ts
import type { EIP1193Provider } from '@baas/sdk';

// MetaMask / browser-injected wallet
const session = await baas.auth.signInWithWallet(window.ethereum as EIP1193Provider);

// Any wagmi connector also works
const provider = await connector.getProvider();
const session = await baas.auth.signInWithWallet(provider);
```

The user sees **two** wallet prompts: one to connect, one to sign the message. That's standard wallet UX.

## Next

* [Passkeys](/baas-sdk/authentication/passkeys.md) — sign in with the device's built-in authenticator.
* [Sessions](/baas-sdk/authentication/sessions.md) — read the session, listen for changes, and sign out.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.baas.sh/baas-sdk/authentication/external-wallet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
