Show linked sign-in providers on account settings #86
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/show-linked-providers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes task 161's core requirement:
/accountnow readsGET /api/users/me/linked-providersand shows which providers are linked, instead of only the transient "just linked" cue.UserResponsefield — same shape asGET /api/users/me/invitations(ADR-0075).subjectis excluded at the SQL projection, never read into the process — onlyissuerandlinked_atreach the wire.ADR-0075 added (0074 is claimed by PR #85).
Verdict: mergeable
subjectis excluded at the SQL projection (SelectLinkedIdentitiesByUserIdnever selects it),LinkedIdentity/LinkedProviderResponsehave no field for it, and mutating the SQL to drop theWHERE user_idscope makes bothLinkedProvidersEndpointTestsisolation tests fail as expected — the endpoint is genuinelyme-scoped. No composite key or id is exposed.Endpoint-shape reasoning holds:
PutMe's single-rowRETURNINGis a real constraint against folding this intoUserResponse, and the round-trip cost is paid once per page load, not per action.Scope discipline is clean —
StepUpPurposehas its one existing member, no unlink endpoint or dead branch. The empty/failure distinction inAccount.razoris correct (_linkedProviders is not nullgates the empty message, so a failed load only ever shows the error); confirmed by swallowing the load error into_linkedProviders = [], which breaksAccount_LinkedProvidersFailToLoad_...as expected.No schema change, no DbUp script, contract types only on the wire,
GroupScopedEndpointAuthorisationTests' route enumeration correctly doesn't need updating (prefix-based, doesn't match/api/users/me/...). ADR-0075 is free on main and PR #85 claims 0074 as stated. Build and full test suite (including Testcontainers-backed integration tests) pass clean on SDK 10.0.100; CI is green on the head commit; merges cleanly against main.