Repository navigation
Conversation
oidc.deviceCode: true signs in with the RFC 8628 device grant instead of the loopback redirect, for SSH, devcontainers and other headless setups. Off by default and settings-only, as a device code is easier to phish. Ported to the Go extension as well. Refs jesset/pi-provider-litellm-oidc#3
Two review findings on the device grant, both in the poll loop and both mirrored in the Go port. - The IdP's `interval` was only honored up to 60 seconds, and anything larger fell back to 5, so an IdP asking for 120 got polled 11 times a minute instead of once. RFC 8628 treats it as a minimum wait with no upper bound, so it is honored as given; one past the deadline expires the login, which is what the deadline check already did. - A request that did not complete retried at the original pace, since only `slow_down` moved the interval. RFC 8628 requires polling to slow down after a connection timeout and recommends exponential backoff, so every transient failure now doubles the wait. A connection timeout arrives here as the same transient failure as a network error or a 5xx, so all of them back off and nothing new has to be threaded through the token helper. Reported by Greptile on #309.
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.
oidc.deviceCode: truesigns in with the RFC 8628 device grant instead of the loopback redirect, for SSH, devcontainers and other headless setups. Sameoidc_pkcecredential and refresh as the loopback flow.Off by default and settings-only, because a device code is easier to phish: the login prompt never offers it, nothing falls back to it, and Pi shows the plain verification URL rather than
verification_uri_complete, so you always compare the code yourself.The IdP must publish a
device_authorization_endpointand allow the grant for the client. Ported to the Go extension as well. README has the details.Refs jesset/pi-provider-litellm-oidc#3


Confidence Score: 5/5
The PR appears safe to merge, with both previous findings addressed and no new actionable issues found.Summary
Adds opt-in device code login to Direct OIDC in TypeScript and Go.
Reviews (2) · Last reviewed commit: "fix(auth): follow RFC 8628 polling rules..." · Reviewed by Greptile