# Members, tokens and sign-in

> How people sign in, create projects and invite members, how agents get access through OAuth or a token, what each kind of token can do, and how to export or delete your account.

A project has members: people and agents. Each member has a role, and each token acts as a member or as the project itself. This page covers how people sign in, how members join, and the tokens and OAuth connections that give programs and agents access. Roles, scopes and agent rules are on [agents and permissions](/docs/agents.md).

## Sign in

The studio lives at `https://studio.galerne.cloud`. People sign in with their email address: Galerne sends a 6-digit code, valid for 10 minutes, with 5 tries. A code can be asked 5 times an hour per address. A session lasts 30 days on that browser.

Companies on the Business plan can send their people through their identity provider instead, with OIDC. See [SSO and SCIM](/docs/sso.md).

During the private beta, a new account waits for approval before it can create projects. An invitation skips the wait: whoever is invited to a project gets in at once.

## Projects

Anyone with an approved account creates projects from the studio home page. The project slug appears in every URL, such as `https://api.galerne.cloud/p/acme/v1/query`. Each project has its own database, plan, members and tokens. The person who creates a project is its first admin, and a project always keeps at least one human admin.

**Settings**, **Danger zone** deletes a project. Every token of the project stops working at once.

## Invite people

In **Settings**, **Members**, an admin enters an email address and picks a role: viewer, contributor, editor or admin. When the person already has an account, they join at once. Otherwise they get an invitation by email, valid 14 days, and join when they first sign in with that address. Pending invitations show on the same page, where they can be canceled.

On the Free plan, the people included (3) is a hard cap, invitations included. On paid plans, each person beyond those included costs extra; see [limits and plans](/docs/limits.md). Agents never count as seats.

The same page changes a member's role and, on Business, limits a member to some languages, types and branches. Removing a member ends their access at once and deletes their git token for the [site repo](/docs/sites.md).

## Agents

An agent is a member of kind `agent`, with an owner, a role and its own rules. Create one in **Settings**, **Agents and MCP**, or let an MCP client create one at its OAuth sign-in. The [agent rules](/docs/agents.md#agent-rules) set its branches, types, writing on `main`, promotion and rate limit. The kill switch on that page disables an agent and every token it holds.

## Tokens

A token is a secret that starts with `gal_`. Galerne shows it once and keeps only a hash.

| Kind | Made in | Acts as |
|---|---|---|
| Project token | **Settings**, **API tokens** | The project, with the scope you pick. For sites, CI and scripts |
| Agent token | **Settings**, **Agents and MCP** | That agent, with its role and rules, capped by the scope |
| OAuth token | An MCP client's sign-in | The agent picked on the consent page |
| Site tokens | `create_site`, `site_env` | Read tokens for a [managed site](/docs/sites.md) and its branch builds |

Each token has one scope: `read:published`, `read:drafts`, `read`, `write` or `admin`. The [scopes table](/docs/agents.md#tokens-and-scopes) says what each one allows. A token can expire after a number of days, from 1 to 3,650; without that, it lasts until it is revoked.

Send it in the `Authorization` header, or in `x-galerne-secret` on platforms that reserve `Authorization`:

```bash
curl https://api.galerne.cloud/p/acme/v1/schema -H "Authorization: Bearer gal_…"
curl https://api.galerne.cloud/p/acme/v1/schema -H "x-galerne-secret: gal_…"
```

The tokens page lists every live token with the member it acts as, its scope, when it expires and when it was last used. **revoke** stops it at once. Creating and revoking tokens is recorded in the [audit log](/docs/agents.md#audit-log).

## OAuth for MCP clients

MCP clients such as Claude, Cursor and ChatGPT sign in with OAuth 2.1, so nobody pastes a token:

1. The client reads `https://api.galerne.cloud/.well-known/oauth-protected-resource/p/<project>/mcp` and the authorization server metadata, and registers itself (dynamic client registration).
2. It opens the consent page in the studio. You sign in, pick the project, and pick the agent the client acts as, or create one with a role, branches, and the rights to write on `main` and to promote. You can give at most your own role, and only editors and admins can give the rights on `main`.
3. You choose read or write access. The client gets an access token for one hour and a refresh token that rotates on each use and expires after 60 days without use.

**Settings**, **Connected apps** lists the MCP clients that signed in to the project. **disconnect** revokes every token the client holds there. Disabling the agent it acts as does the same.

The endpoints are on the [HTTP API](/docs/api.md#oauth) page.

## Your account

**Account** in the studio holds your name, your billing details (company, address, country and VAT number) and your invoices. It also has two buttons for your data:

- **export** downloads, as JSON, what Galerne holds about your account: your account, memberships, agents you own, sessions, your audit entries and your billing details.
- **delete** removes your account. Delete the projects you own first. Your memberships and sessions are removed, agents you own are disabled, and your name in audit entries becomes "deleted account".
