feat: oidc device code login support #17
Merged
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.
Disclaimer Greptiles Reviews use AI, make sure to check over its work.
To better help train Greptile on our codebase, if the comment is useful and valid Like the comment, if its not helpful or invalid Dislike
Greptile Summary
This PR implements OIDC device code flow authentication for the Arcane CLI, enabling passwordless login through OAuth2 providers. The implementation follows RFC 8628 for OAuth 2.0 Device Authorization Grant.
Key Changes:
auth device-login,auth refresh-oidc, andauth oidcsubcommandsrefresh_token,oidc_client_id,oidc_client_secret,oidc_token_endpoint)spec.yaml)Implementation Details:
authorization_pending,slow_down,access_denied, andexpired_tokenaccess_tokenis stored asjwt_tokenin the config for consistency with existing JWT-based authenticationapi_key.clear()from login to support dual authentication methods (API key and JWT/OIDC)openidandoffline_accessto ensure proper token refresh capabilityAdditional Features:
Confidence Score: 4/5
api_key.clear()is intentional to support dual authentication methods. Minor consideration: the largespec.yamladdition (13,906 lines) is typical for OpenAPI specs but should be verified to match the actual API implementation.Important Files Changed
api_key.clear()from login to support dual authentication methods.current_passwordtoOption<String>to support OIDC users without passwords. Added GitOps and Customize module types.refresh_token,oidc_client_id,oidc_client_secret,oidc_token_endpoint) to store OIDC authentication state.environment_sync_registriesendpoint.