An install can let invited people sign in to the dashboard with their ChatGPT account, and run their Aero answers on their own ChatGPT plan instead of the install’s provider key. The two are switched on separately:
| Switch | What it does | What OpenAI must have approved |
|---|---|---|
chatgpt.signIn |
“Continue with ChatGPT” on the sign-in screen, for invited email addresses | A hosted OAuth client (identity scopes) |
chatgpt.planUsage |
A signed-in viewer’s Aero runs on their ChatGPT plan once they connect it | The same client with the plan scopes (resource.invoke, chatgpt.tokens.use.direct) |
chatgpt.requirePlan |
Viewers must connect their plan to use Aero; the install’s key never pays for viewer Aero | Same as planUsage |
Both are off unless configured. Name and password sign-in, API keys and the operator’s own Aero are unchanged.
planUsage on.<publicUrl>/api/v1/auth/chatgpt/callback, e.g.
https://dash.example.com/api/v1/auth/chatgpt/callback. Each install’s
callback must be registered with the client. publicUrl must be HTTPS (a
loopback http://localhost URL works for local testing only).In config.yaml:
publicUrl: https://dash.example.com
chatgpt:
clientId: <client ID from OpenAI>
clientSecret: <only for a confidential client>
signIn: true
planUsage: true
requirePlan: true # optional: no viewer Aero without the viewer's own plan
tokenKey: <64 hex characters: openssl rand -hex 32>
tokenKey encrypts each person’s plan tokens in the database (AES-256-GCM,
bound to the row). It is required with planUsage. CANONRY_CHATGPT_TOKEN_KEY
overrides it. Changing it asks every connected person to connect again; it
does not sign anyone out.agent.allowViewers: true) for viewers to use Aero
at all.CANONRY_TRUST_PROXY (as for name
and password sign-in): the ChatGPT routes budget each caller by their real
address, and an undeclared proxy makes everyone share one budget.publicUrl stays off and logs
chatgpt.disabled.Sign in with ChatGPT admits only invited email addresses and accounts that already linked ChatGPT.
cnry user invite jordan@example.com --role viewer
cnry user invitations
cnry user uninvite <invitation-id>
Nothing is emailed. Tell the person to open the dashboard and choose Continue with ChatGPT with the ChatGPT account that uses that address. If ChatGPT reports the address as verified, their account is created with the invited role and their ChatGPT identity is linked to it. From then on the identity, not the email, signs them in.
/api/v1/auth/chatgpt/start?intent=connect).API: GET|POST /api/v1/users/invitations, DELETE /api/v1/users/invitations/{id}
(administrators or a full-instance key, users.read / users.write).
signIn on, Continue with ChatGPT is the main
action and name and password sit behind Sign in with a password for
administrators. A refused ChatGPT sign-in comes back with one plain sentence
(see Troubleshooting).requirePlan, a viewer without a working plan sees Connect ChatGPT to use
Aero and a connect step in place of the conversation. Without it, a quiet
Use your ChatGPT plan link sits under the composer.The button uses OpenAI’s black and white formats through the dashboard’s primary button. OpenAI’s guidelines also call for their logo on it: add the official asset from OpenAI before a public launch.
With planUsage on, signing in with ChatGPT also asks the person to let the
dashboard use their plan. Once granted:
GET /api/v1/auth/chatgpt/models, PUT /api/v1/auth/chatgpt/model).https://api.openai.com/v1, never through a configured
OpenAI proxy, with store: false.When the plan cannot answer, the person sees one of: connect again, usage
limit reached (with a link to https://chatgpt.com/settings/usage), plan not
eligible, or ChatGPT unavailable. A plan that needs connecting again is
refused, not charged to the install. A viewer with no plan connected uses the
install’s Aero as before, unless requirePlan is on: then Aero asks them to
connect their plan first (409, reason chatgpt-connect-required), and
GET /api/v1/auth/chatgpt/status reports planRequired: true so the
dashboard can offer the connect step up front.
POST /api/v1/auth/chatgpt/disconnect deletes the stored grant, then revokes
it at OpenAI; revoked: false means OpenAI did not confirm, and the person
can also remove the app in ChatGPT settings. The ChatGPT link stays, so they
can still sign in with it.
state and nonce. The PKCE
verifier and a browser-binding secret live in a ten-minute HttpOnly cookie
on the browser that started the sign-in; the database holds only digests. A
callback opened in another browser, replayed, or late is refused.https://auth.openai.com, this client as audience, expiry, and the nonce.config.yaml: they are per person and rotate hourly. They are stored only
as ciphertext under tokenKey, which lives in config.yaml.The sign-in screen reports chatgpt_error codes after a failed callback:
| Code | Meaning |
|---|---|
not-invited |
No linked identity and no pending invitation for that verified email |
unverified-email |
ChatGPT has not verified the account’s email |
already-linked |
That ChatGPT account is linked to another account here |
expired |
Took longer than ten minutes, opened in another browser, or replayed |
denied |
The person cancelled at OpenAI |
disabled |
Sign-in is off, or the block is incomplete |
failed |
OpenAI refused the code, or the ID token did not verify |
GET /api/v1/auth/chatgpt/status shows what the install offers and the
signed-in person’s link and plan.