Skip to content
TesseraDocs
MenuApps

Apps

An app is an OAuth client in a realm: the web app, API, agent or MCP server that asks Tessera to sign people in.

View as Markdown

On this page

An app is an OAuth client in a realm: the web app, API, agent or MCP server that asks Tessera to sign people in.

Each app has a client_id and a list of redirect URLs. Tessera sends a person back only to a URL on that list, so a wrong address cannot capture a sign-in.

Kinds of app

Kind Secret Use it for
Confidential Yes, kept on your server Server-side web apps. This is what tessera init creates by default.
Public No, uses PKCE Single-page apps and mobile apps. Use tessera init --public.
MCP server None for the server itself A resource that Tessera protects. See protect an MCP server.

For details on each, see client types.

Register an app

The quickest way is tessera init in your project folder. It creates the app with the right redirect URLs for your stack and dev port, and writes the environment variables to .env.local. The client secret is written there once and printed nowhere. See tell your agent. A coding agent does not need your credentials: a realm administrator mints a short-lived pairing code (tessera pairing create) and the agent runs tessera init --pair <code>, which can register one app and nothing else. See the CLI.

You can also add an app in the console. Add the redirect URL of every place the app runs, and run tessera init --url https://app.example.com for a deployed address.

What a redirect URL can be

Matching is exact: scheme, host, port, path and trailing slash all count. The admin API refuses a redirect URL that breaks the rules below with 400 and the error code redirect_uri_invalid. Its detail names which entry of redirect_uris is wrong.

  • https:// for anything deployed.
  • http://localhost or http://127.0.0.1 (or http://[::1]) for local development. A redirect URL on an IP literal matches any port, as native apps need. localhost matches the exact port you registered.
  • A reverse-domain scheme for a mobile or desktop app, such as com.example.app:/callback.
  • No fragment (#...), and no user name or password in the URL.

Access apps

There is a second, related meaning of "app" in a realm. An access app is a namespace for permissions, such as acme, bound to one or more clients and to the resource addresses that the app's tokens are meant for. Roles live inside an access app. See roles and permissions.

You can create an access app from a client with the standard template. It gives you two roles to start with, member and admin. This is done with the admin API or tessera access.

Limit who can sign in to an app

By default any user of the realm can sign in to any app in it. A client can list required_roles, and then Tessera refuses everyone who holds none of them. The check runs at sign-in and again when tokens are issued or refreshed, so removing a role cuts the person off at the next token refresh. See roles and permissions.

Per-app look

An app can have its own theme, so people who sign in to it see its brand while still sharing one login host and single sign-on. See themes.