---
title: Client types
summary: A client is the registration of your app in a realm; its type decides how it proves who it is and which settings you can change.
section: connect
order: 3
---
# Client types

A client is the registration of your app in a realm; its type decides how it proves who it is and which settings you can change.

## Public and confidential

| | Public | Confidential |
| --- | --- | --- |
| Runs in | A browser, a phone or a desktop app | A server you control |
| Has a secret | No | Yes, shown once when created |
| Proves itself at `/token` with | Only its `client_id` plus PKCE | Its secret (or a signed key assertion) |
| Typical grants | `authorization_code`, `refresh_token` | The same, plus `client_credentials` for machine-to-machine calls |

Pick confidential whenever your code runs on a server. A server-rendered app (Next.js, SvelteKit, Express, Go, Python) is confidential. A single-page app with no server of its own is public.

Rules Tessera enforces:

- A public client must not send a secret. A confidential client must authenticate.
- Confidential clients authenticate with `client_secret_basic` (HTTP Basic), `client_secret_post` (form fields) or `private_key_jwt`. Discovery lists these under `token_endpoint_auth_methods_supported`.
- Public clients cannot use `client_credentials`.
- Only confidential clients can call `/introspect`. A public client gets `401` with [`introspection_requires_confidential_client`](/errors/introspection_requires_confidential_client.md); validate its JWT access tokens against the JWKS instead.
- Token, revoke and introspect parameters are read from the form-encoded request body only. A `client_secret`, `code` or `refresh_token` sent in the query string is ignored.
- Rotating a secret makes the old one stop working at once. Use `tessera clients rotate-secret`; see [the CLI](/docs/reference/cli.md).

## PKCE is required

Every authorization request needs `code_challenge` with `code_challenge_method=S256`, and the code exchange needs the matching `code_verifier`. This is `pkce_required: true`, the default. The verifier is 43 to 128 characters from `A-Z a-z 0-9 - . _ ~`, and the challenge is the 43-character S256 hash of it.

There is one narrow exception. A statically registered confidential client with a secret may be set to `pkce_required: false`, for software that cannot do PKCE. The setting is audited. It is never allowed for:

- public clients
- clients created by dynamic registration or a client metadata document
- MCP clients

If you can use PKCE, do. It costs a few lines and protects the code even if the secret leaks.

## ID token signing algorithm

ID tokens are signed with `EdDSA` by default. Many OIDC libraries only verify `RS256` unless you configure them. Each client therefore has a setting, `id_token_signed_response_alg`, that is either `EdDSA` or `RS256`.

- `tessera init` creates clients with `RS256`, so the quickstarts work out of the box.
- To change it, set `id_token_signed_response_alg` on the client in a realm spec, through the admin API, or in dynamic registration metadata:

```yaml
clients:
  - client_id: acme-web
    kind: confidential
    id_token_signed_response_alg: RS256
```

- The setting affects ID tokens only. Access tokens are always signed with `EdDSA`. See [Token claims](/docs/reference/claims.md).
- Both keys are published at `jwks_uri`, so a library that picks the key by `kid` works with either.

## First-party and third-party

Every client is either first-party or third-party. This decides whether the person sees a consent screen.

| | First-party | Third-party |
| --- | --- | --- |
| Who it is | Your own apps, registered by a realm administrator | Apps that registered themselves (dynamic registration, client metadata documents) or that an administrator marked third-party |
| Consent screen | Never | Shown until the person approves the scopes and resources the app asks for |
| Remembered | Not applicable | Per person and per client; asked again when the app asks for more |

Clients you create with `tessera init`, `tessera clients ensure` or a realm spec are first-party. Apps that arrive through dynamic client registration (an MCP client, for example) are third-party unless an administrator says otherwise. A third-party client can also be sent to the consent screen again with `prompt=consent`.

The consent screen names the app, what it asks for and where the person will be sent. Realm theming never changes that wording.

## Scopes, resources and redirect URIs

- **Redirect URIs** are matched exactly. Register every URI you use, including the local development one. A mismatch gives [`redirect_uri_mismatch`](/errors/redirect_uri_mismatch.md). Allowed forms are `https://`, `http://` on loopback (`localhost`, `127.0.0.1`, `[::1]`) and a reverse-domain private-use scheme for native apps such as `com.example.app:/callback`; no fragments or credentials. One exception to exact matching: a registered `http://127.0.0.1` or `http://[::1]` URI also matches the same URI on any port, since a native app picks a free port at run time. When you register a URI through the admin API, one that breaks these rules is refused with [`redirect_uri_invalid`](/errors/redirect_uri_invalid.md).
- **Scopes** a client may request are listed on the client. Asking for one that is not listed is refused.
- **Resources** are the APIs the client may get tokens for. A plain OIDC app has none and needs none: it sends no `resource`, and its access token's `aud` is its own `client_id`. A client that lists resources and sends no `resource` gets its first allowed one. An MCP client must always send `resource`.
- **Web origins** are the browser origins allowed to call `/token`, `/userinfo`, `/revoke` and `/logout` from JavaScript (CORS). Discovery and JWKS are open to any origin.
