Add Hugging Face OAuth2 provider to migration allow-list - #221
Merged
Conversation
Appwrite server is adding a built-in 'huggingface' OAuth2 provider (appwrite/appwrite#13123). Without an entry in the PROVIDERS allow-list, migrations fail with "No migration resource for OAuth2 provider 'huggingface'; skipped." — fromArray() returns null before the isConfigured() check, so the error fires even on projects that never configured the provider, failing the whole migration. Only clientId migrates (to the huggingfaceAppid attribute); clientSecret is write-only and stays redacted per the existing policy. Hugging Face uses the default clientId/clientSecret field names and has no extra settings, so there are no TARGET_SECRET fields. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Greptile SummaryAdds Hugging Face to the explicit OAuth2 provider allow-list so migrations preserve its client ID without copying its write-only client secret.
Confidence Score: 5/5The PR appears safe to merge with no actionable defects identified. The new provider follows the established client-ID-only mapping, and the focused test verifies that the destination app ID is populated while secret data remains excluded. Important Files Changed
Reviews (1): Last reviewed commit: "Add Hugging Face OAuth2 provider to migr..." | Re-trigger Greptile |
Meldiron
added a commit
to arpit10128/appwrite
that referenced
this pull request
Aug 19, 2026
2.0.4 adds 'huggingface' to the OAuth2 provider migration allow-list (utopia-php/migration#221). Without it, the Appwrite migration source cannot map the new provider and every migration fails with "No migration resource for OAuth2 provider 'huggingface'; skipped.", which was breaking the Migrations E2E suite on this PR. Reaching 2.0.4 also requires utopia-php/abuse 2.0.1 (within the existing 2.0.* constraint): migration >= 2.0.3 needs the appwrite/appwrite PHP SDK ^27, and abuse 2.0.0 pinned it to ^26. abuse 2.0.1 requires ^27.1, so the SDK moves 26.1.0 => 27.1.0. Nothing in this repository uses that SDK directly; it is a transitive dependency of abuse and migration only. Lock-only change, no composer.json constraints touched. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
What does this PR do?
Adds
huggingfaceto theOAuth2Provider::PROVIDERSallow-list.Appwrite server is adding a built-in Hugging Face OAuth2 provider (appwrite/appwrite#13123). Once that provider is enabled in
app/config/oAuthProviders.php, it shows up inGET /project/oauth2-providers, and the Appwrite source enumerates it during a migration. Without an allow-list entry,OAuth2Provider::fromArray()returnsnullandSources/Appwrite.phprecords:addErrormarks the whole migrationfailed. Note thenullcheck runs beforeisConfigured(), so this fires even for projects that never configured the provider — it breaks every migration, not just ones using Hugging Face. This is currently failing the Migrations E2E suite on the Appwrite PR.Only
clientIdmigrates (to the destination'shuggingfaceAppidattribute);clientSecretis write-only and stays redacted per the existing policy. Hugging Face uses the defaultclientId/clientSecretfield names and exposes no extra settings ('form' => falsein the Appwrite config), so it needs noTARGET_SECRETfields — same shape asgithub.Same change as #0eb1a58 (
Add appwrite OAuth2 provider to migration allow-list).Test Plan
testFromArrayHuggingFace, mirroringtestFromArrayAppwrite: assertsclientIdlands on the app ID target, no secret fields are produced, andclientSecretis not copied into settings.testFromArrayNeverCopiesSecretsalready iteratesarray_keys(OAuth2Provider::PROVIDERS), so it now covers the new key too.Follow-up
Needs a
2.0.4tag, then acomposer.lockbump on appwrite/appwrite#13123 (its^2.0.0constraint already allows it).🤖 Generated with Claude Code