Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device code flow not respecting slow_down #76

Open
jerr0328 opened this issue Dec 10, 2024 · 2 comments
Open

Device code flow not respecting slow_down #76

jerr0328 opened this issue Dec 10, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@jerr0328
Copy link

In cli/cli#9370 (comment), several people, including myself, have issues with the gh cli that is not working properly with login when the auth server responds with "slow_down" error. According to the RFC8628 section 3.5, this means the client MUST increase the interval of polling, and it should continue to poll and not crash out. I had a look at the code (I'm don't consider myself a Go developer) and I didn't see any handling of that (e.g. https://github.com/cli/oauth/blob/main/device/device_flow.go#L190). Presumably the change needs to not only check that "slow_down" being a possible "continue" case but also increase the interval or use the new interval provided.

@williammartin
Copy link
Member

Hey @jerr0328, you're right that this module does not handle slow_down. It's definitely something we can implement, though I'm not sure it'll really deal with the underlying issue there, as I mentioned here: cli/cli#9370 (comment).

We can definitely do it and see what the outcome is though!

@williammartin
Copy link
Member

Acceptance

Given I am logging in against a server that responds with slow_down when requesting the access token
When I go through an oauth flow targeting that server
Then the requests for the acess_token increase by 5 seconds per slow_down response received.

@williammartin williammartin added the help wanted Extra attention is needed label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants