# accounts

> Accounts SDK for apps on Tempo. Signs users in through Tempo ID, and keeps their session and access key.

Each link opens a page's Markdown. [llms-full.txt](https://accounts.tehq.dev/llms-full.txt) holds every page in one file.

## Introduction

- [Getting started](https://accounts.tehq.dev/docs/introduction/getting-started.md): Sign users in with Tempo ID, and keep their session, their access key, and a Viem client that signs with it.
- [Setup](https://accounts.tehq.dev/docs/introduction/setup.md): Select the client ID, the plugins, and the Tempo ID deployment of an app.
- [Limitations](https://accounts.tehq.dev/docs/introduction/limitations.md): The sign-in methods and features that Tempo ID limits to some apps or pages.

## Guides

### Sign-in flows

- [Dialog](https://accounts.tehq.dev/docs/guides/dialog.md): Sign a user in with Tempo ID in a dialog on the app's page.
- [Redirect](https://accounts.tehq.dev/docs/guides/redirect.md): Sign a user in on Tempo ID's pages in the same window, and complete the sign-in on return.
- [Headless / Custom](https://accounts.tehq.dev/docs/guides/custom-ui.md): Sign a user in from the app's own form, with an emailed code or a passkey.
- [Mobile](https://accounts.tehq.dev/docs/guides/mobile.md): Sign a user in from an Expo app, in an authentication sheet that shows Tempo ID's pages.
- [Backend](https://accounts.tehq.dev/docs/guides/backend.md): Sign a user in on the app's server, which holds the tokens and the access key.
- [Sign-In With Ethereum](https://accounts.tehq.dev/docs/guides/siwe.md): Sign a user in on a backend with a message that the user's account signs.
- [CLI](https://accounts.tehq.dev/docs/guides/cli.md): Sign a user in from a command-line tool through the device grant.

### Tasks after sign-in

- [Access keys](https://accounts.tehq.dev/docs/guides/access-keys.md): Request an access key at sign-in, and act for the user's Tempo Account within its limits until it expires.
- [Connections](https://accounts.tehq.dev/docs/guides/connections.md): Pay for a user from an API, with an access key that the API holds for one connection.
- [Sessions](https://accounts.tehq.dev/docs/guides/sessions.md): Restore the session of a signed-in user, call an API with its access token, and sign the user out.
- [React](https://accounts.tehq.dev/docs/guides/react.md): Read the session of an instance in a React app with a hook that renders again at each change.
- [MPP payments](https://accounts.tehq.dev/docs/guides/mpp.md): Pay the charges, sessions, and subscriptions of Machine Payments Protocol endpoints from a Tempo Account.
- [Viem](https://accounts.tehq.dev/docs/guides/viem.md): Send transactions and sign messages on Tempo with a Viem client whose account follows the session.
- [Wagmi](https://accounts.tehq.dev/docs/guides/wagmi.md): Connect a wagmi app to Tempo ID, and sign with the access key of the session.
- [Fee sponsorship](https://accounts.tehq.dev/docs/guides/fee-sponsorship.md): Pay the fees of a user's transactions from a sponsor, so the Tempo Account pays none.
- [Errors](https://accounts.tehq.dev/docs/guides/errors.md): Branch on the reason, the code, and the message of each request that Tempo ID refuses.

### Identity

- [Identity](https://accounts.tehq.dev/docs/guides/identity.md): Read the signed-in user of a session, and identify that user to a server.
- [API authentication](https://accounts.tehq.dev/docs/guides/api-authentication.md): Send the access token of a session to an API, and verify the token in the API.
- [Account proof](https://accounts.tehq.dev/docs/guides/account-proof.md): Prove to a server that the signed-in user controls a Tempo Account.
- [Sign-out](https://accounts.tehq.dev/docs/guides/sign-out.md): End the session of an app, of a backend, or of every app on the user's Tempo ID session.
- [Compliance screening](https://accounts.tehq.dev/docs/guides/compliance.md): Read the screening state of a Tempo Account from an access token, and refuse a flagged address.

### Migration

- [Migration from v0](https://accounts.tehq.dev/docs/guides/migration.md): Move an app from version 0 of the package to version 1, the SDK of Tempo ID.
