feat: anaconda OAuth support (draft snapshot) - #2412
Draft
nichmor wants to merge 9 commits into
Draft
Conversation
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.
Summary
Draft snapshot of in-progress Anaconda OAuth support. Posted as a placeholder so the work isn't lost; not ready for review or merge.
This branch builds on the OAuth login infrastructure being prepared in a separate (smaller, mergeable) PR for prefix.dev OAuth login. Once that lands and Anaconda's server-side bits are sorted out, this branch will be rebased and the Anaconda-specific changes will be cleaned up into a focused follow-up PR.
What this contains
On top of the OAuth login + storage + refresh + upload-side wiring shared with the prefix.dev branch, this snapshot has the Anaconda-specific scaffolding:
ANACONDA_OAUTH_SCOPESconstant (openid email profile offline_access)default_oauth_config_for_hostbranches foranaconda.organdanaconda.com(with the auth.anaconda.com identity provider, registered client ID, and fixed redirect URI)fetch_provider_metadata_lenient— a targeted workaround for Anaconda's OIDC discovery doc, which omitssubject_types_supportedandid_token_signing_alg_values_supportedauth.anaconda.comhost check indiscover_endpointsKnown gaps before this can land
conda.anaconda.orgdirectly — they need to be exchanged for a long-lived API key via Anaconda'sapi/auth/api-keysendpoint, then stored asAuthentication::CondaToken(...). The exchange-step machinery is not yet implemented on this branch.Test plan
Authentication::CondaToken, notAuthentication::OAuth🤖 Generated with Claude Code