Repository navigation
Feat 13067 huggingface oauth provider - #13123
Conversation
|
@Meldiron Thanks! As suggested, I've opened this as a draft PR. I'd appreciate it if you could take a look when you have a chance. |
Greptile SummaryThe PR adds Hugging Face as a supported OAuth2 provider and wires it through provider configuration, project management endpoints, response models, service registration, and tests. The latest revision fixes the previously reported credential-verification issue by adding the Basic Authorization header with a separate client call.
Confidence Score: 5/5The PR appears safe to merge because the previously reported credential-verification failure has been corrected and no blocking failure remains. The current implementation sets Content-Type and Basic Authorization through separate header calls before validating Hugging Face credentials, resolving the prior defect; no blocking failure remains. Important Files Changed
Reviews (5): Last reviewed commit: "chore: bump utopia-php/migration to 2.0...." | Re-trigger Greptile |
|
I did manual QA, building demo app
|
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Matej Bačo <[email protected]>
Co-authored-by: Matej Bačo <[email protected]>
Co-authored-by: Matej Bačo <[email protected]>
…ingFace/Update.php Co-authored-by: Matej Bačo <[email protected]>
…ingFace/Update.php Co-authored-by: Matej Bačo <[email protected]>
`composer lint` failed on the three new files: array/statement indentation and whitespace in blank lines in the OAuth2 provider, plus a missing newline at end of file in all three. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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) <[email protected]>
Appwrite server is adding a built-in 'huggingface' OAuth2 provider (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) <[email protected]>




What does this PR do?
This PR includes the backend implementation required to support Hugging Face authentication, including provider configuration, OAuth2 endpoints, models, and related updates.
Test Plan
Ran the OAuth2 provider tests and confirmed the implementation works as expected.

Related PRs and Issues
Checklist