Skip to content

improvement: authentication synchronization between terminal and browser #121

Description

@poswalsameer

Description

  1. While running the supercode login command, the CLI prompted me with a Y/N question asking whether to open the browser automatically.
  2. Before responding to the prompt, I manually copied the authentication URL and completed the authorization flow in the browser.
  3. After returning to the terminal, there was no synchronization between the web app and the CLI.
  4. I then selected No, after which the TUI started polling for the authorization response and continued polling indefinitely.

Expected Behavior

If the user completes the authorization flow manually before responding to the Y/N prompt, the CLI should first check whether the user has already been authenticated.

Suggested flow:

  1. Perform a direct database/auth state check to see if authorization has already been completed.
  2. If authorization is not found, start polling for the authentication response.

This would prevent unnecessary polling and ensure that manual authorization flows are handled correctly.

Screenshots:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions