Connect and sign in
OAuth sign-in How it works
OAuth 2.1 for public clients: authorization code with PKCE S256, no client secret, consent on Xale's own page, opaque bearer tokens.
The shape
- OAuth 2.1, public clients only: no client secret,
token_.endpoint_ auth_ methods_ supported: ["none"] - Authorization code with PKCE;
S256is required. - Clients register themselves (RFC 7591), but only with the known apps' callback addresses or a loopback address. See Dynamic client registration.
- The person approves on Xale's own page, signed in to their Xale account.
Discovery
A call to /api/mcp without a valid token gets 401, JSON-RPC code -32001 (“Sign in to Xale to use this connector.”), and:
WWW-Authenticate: Bearer resource_metadata="https://xale.app/.well-known/oauth-protected-resource/api/mcp", scope="read write:memories write:intentions write:changes"When a token was sent but isn't valid (expired, revoked, unknown), the header adds error="invalid_
| Document | Address | Standard |
|---|---|---|
| Protected resource metadata | /. and /. | RFC 9728 |
| Authorization server metadata | /., also served at /. | RFC 8414 |
Both are public, with Cache-Control: public, max-age=300. The authentication challenge lists the default AI scopes. The discovery documents also advertise read:now for a display-only client.
Authorization server metadata
| Field | Value |
|---|---|
issuer | https://xale. |
authorization_ | https://xale. (a Xale page) |
token_ | https://xale. |
registration_ | https://xale. |
revocation_ | https://xale. |
scopes_ | read, read:now, write:memories, write:intentions, write:changes, offline_ |
response_ | code |
response_ | query |
grant_ | authorization_, refresh_ |
code_ | S256 |
authorization_ | true |
The authorization request
Parameters read: client_, redirect_, response_, code_, code_, state, scope, resource. Any of them sent twice is refused.
| Check | If it fails |
|---|---|
client_ is a registered client | Xale's page says so; no redirect |
redirect_ matches a registered one (it may be left out when the client registered exactly one) | Xale's page says so; no redirect |
state is at most 2,048 characters | Xale's page says so; no redirect |
response_ | Redirect with unsupported_ |
code_ is 43 characters: letters, digits, - and _ | Redirect with invalid_ |
code_ | Redirect with invalid_ |
resource, if sent, is https://xale. (a trailing slash is ignored) | Redirect with invalid_ |
| Every scope is one Xale offers (identity scopes are ignored) | Redirect with invalid_ |
Request scope=read:now explicitly for a display. Consent offers only the display permission. See Scopes for the scope combinations and Now and Up Next for the desktop Python example.
Every redirect back carries iss=https://xale., and state when you sent it.
What the person sees
- Signed out: a preview of who is asking, and Sign in to Xale. Cancel returns
access_.denied - Signed in: the app's name, “It will be able to:”, the read permission, and each write permission as a box they can untick, then Allow or Cancel.
- On a Free account the page says “Connecting your own AI to Xale is part of Xale Pro.” instead of a working Allow. See Xale Pro · required for connecting.
The app's name comes from its callback address, never from its own client_: Claude, ChatGPT, Grok, “A Google app, such as Gemini”, or, for a loopback address, “An app on this computer (it calls itself “…”)”.
Timings
| Step | Lasts |
|---|---|
| A consent (the page's record of exactly what was asked) | 10 minutes, single use, tied to the account that opened it |
| The authorization code | 5 minutes, single use |
On Allow, Xale starts a fresh connection and returns the code; any earlier connection of the same client ends. If the account has no time zone saved, the browser's zone is saved then.
The token request
POST /api/oauth/token, form-encoded: grant_, code, code_ (43–128 characters), client_, and redirect_ when you sent one to ask. The answer and refresh rules are on Tokens · expiry and refresh.
For people
- Checked against main
5692de55