You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: unlinking a connected account always fails — provider sent in the body, route reads the query string #77
deleteCamel (Services/APIClientTransport.swift:140-145) sets httpBody and never touches the
query string. But DELETE /api/user/identities
(app/api/user/identities/route.ts:57-60) reads it from the URL:
const{ searchParams }=newURL(request.url);constprovider=searchParams.get('provider');if(!provider)returnbadRequest('provider is required');
The body is never parsed, so provider is always null.
Fix
Send the provider as a query parameter: DELETE /api/user/identities?provider=<provider>.
Percent-encode the value (see the hazard note about .urlQueryAllowed permitting &/=/+).
providerId is not read by the route at all — drop it from the call, or keep the parameter and
document that the route unlinks all identities for that provider
(deleteMany({ userId, provider }), :64-69). Worth confirming that matches the intent: an
account with two Mastodon identities would lose both.
Unit test asserting the request URL carries ?provider= and that the body is empty.
Acceptance criteria
Disconnecting a linked account from iOS succeeds and the row disappears after a refresh.
Implemented in #93. Closing here — further work tracks in the PR.
Two corrections to my original write-up, from tracing it properly:
The disconnect confirmation copy was already provider-scoped ("You'll no longer be able to sign in with GitHub"), so the deleteMany({ userId, provider }) behaviour does not contradict the UI and no copy changed.
My "an account with two Mastodon identities would lose both" concern was wrong. Mastodon rows are stored as mastodon:{instance}, so two instances are two different provider values and only the matching one is deleted. The multi-row case only arises for rows sharing an identical provider string.
Activity
Adron commentedon Sep 16, 2026
Implemented in #93. Closing here — further work tracks in the PR.
Two corrections to my original write-up, from tracing it properly:
deleteMany({ userId, provider })behaviour does not contradict the UI and no copy changed.mastodon:{instance}, so two instances are two differentprovidervalues and only the matching one is deleted. The multi-row case only arises for rows sharing an identical provider string.