Repository navigation
refactor(auth): stop calling Supabase directly for logout, login checks and live status - #312
Merged
Merged
Conversation
…ks and live status - dcd logout now just deletes the stored session. It never revoked anything server-side, so the Supabase round trip did nothing useful. - dcd login no longer probes Supabase's /auth/v1/user when the API rejects a new token. The error still names the token's issuer. - dcd cloud / status no longer open a Supabase Realtime socket. It was only a speed-up over polling. Logged-in users now poll every 20s, the same as API-key users (was 60s plus realtime pushes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 12, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Part of moving the CLI off direct Supabase calls, so that every request goes through the DeviceCloud API. This PR removes the three uses that need no API changes.
dcd logoutsignOut({ scope: 'local' }). That never revoked anything on the server, so the round trip did nothing useful. One side effect:setSessionwith an expired access token could trigger a token refresh just to sign out.dcd logindiagnostic/auth/v1/userto say whose fault it was.Live result status (
dcd cloud,dcd status)--api-keytip no longer promises live updates.Not in this PR
Token refresh and the storage upload still talk to Supabase. Both need API work first.
Testing
pnpm typecheck,pnpm lint(no new warnings),pnpm test:unit(567 passing),pnpm buildsession-refresh.test.ts. The token-refresh-during-poll tests still cover the polling path.🤖 Generated with Claude Code