Repository navigation
Hand an existing session to desktop sign-in instead of asking again - #5
Merged
Merged
Conversation
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.
Problem
docent's/login(and the desktop app) open/login?mode=desktop&port=…. Desktop mode always showed the sign-in form, even when the browser was already signed in to the dashboard: only the access token was kept, and the local agent needs a refresh token as well.Change
localStoragebesidetokenat sign-in (email code, Google). Apple returns none, so nothing is kept for it./auth/jwt/refreshfor a fresh pair and post it to the agent's/v1/auth/callback, landing on/redirect?mode=desktop, with no form. With no stored token, or a refused one, the form shows as before.userService.logout) and a failed code entry clear the refresh token.src/app/shared/desktop.ts.Notes
tsc --noEmitpasses; not yet exercised in a browser.Test plan
/loginin docent → no form, docent reports signed in/login→ form shows🤖 Generated with Claude Code