Skip to content

Improve /login OAuth debug logging and respect slow_down retry interval #957

@andyfeller

Description

@andyfeller

What is the problem?

Whenever users try to authenticate using /login command, the OAuth device flow can spin for a long time even though the user was successful authenticating via the web browser. One way this might occur is because the Copilot CLI does not handle the slow_down response from GitHub API correctly.

Additionally, there are no debug-level logs to help users or maintainers identify this without debugging running code.

What should happen?

When performing the OAuth device flow, the Copilot CLI should wait longer than the default 5 seconds when the GitHub API returns with a slow_down response and a longer wait interval.

Additionally, there should be sanitized log events to help troubleshoot this issue in the future without the need for debugging.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions