Skip to content

Connections carry who signed in - #298

Merged
czpython merged 1 commit into
mainfrom
connection-identity
Aug 22, 2026
Merged

Connections carry who signed in#298
czpython merged 1 commit into
mainfrom
connection-identity

Conversation

@czpython

@czpython czpython commented Aug 22, 2026

Copy link
Copy Markdown
Owner

A connection row now says who it is. The service declares the provider
endpoint that returns the signed-in account's facts:

class Acme(Service):
    ...
    identity_endpoint = "https://acme.example/oauth/userinfo"
    identity_scopes = ("openid", "email")

Some providers have no such endpoint, or return the facts in a different
shape. They override get_identity(access_token) instead. Only the
platform calls it.

How it lands

  • oauth_connections.identity — a JSONB facts dict (email, username,
    name). The callback fills it once at consent with the fresh access
    token. Any failure leaves the connection unlabeled; the consent never
    fails, and a reconsent that gets no answer keeps the identity it had.
  • identity_scopes join the consent ask visibly.
  • MCP connections get the same fill when the discovered
    authorization-server metadata advertises a userinfo_endpoint.
  • The service card and the Connections page label each row with
    email / username / login / name, falling back to the consent
    date and scopes as before.

@czpython
czpython force-pushed the connection-identity branch 3 times, most recently from fc559a0 to ca8ba69 Compare August 22, 2026 05:56
A service declares where its provider answers "who signed in"
(identity_endpoint, with identity_scopes joining the consent union
visibly); a provider that answers elsewhere or in another shape overrides
get_identity. The callback asks once with the fresh access token and
stamps the facts on the connection — best-effort, an unanswered ask never
fails the consent and never blanks a known identity. MCP connections get
the same stamp for free when the discovered metadata advertises a
userinfo endpoint. The service card and the Connections page label each
row with the provider's own facts — email, username, name — instead of a
bare date.
@czpython
czpython force-pushed the connection-identity branch from ca8ba69 to 3baacd0 Compare August 22, 2026 06:01
@czpython
czpython enabled auto-merge (squash) August 22, 2026 06:01
@czpython
czpython merged commit 5a511a4 into main Aug 22, 2026
2 checks passed
@czpython
czpython deleted the connection-identity branch August 22, 2026 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant