Repository navigation
Add Resend OAuth2 adapter - #13366
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5 <[email protected]>
Basic auth already identifies the client, so client_id is not repeated in the token, refresh, and credential-check bodies, per the Resend OAuth client guide. Co-Authored-By: Claude Fable 5 <[email protected]>
Adding the update action to the service only wires up the route. The console provider list filters on getProviderActions(), and the provider read endpoints declare a union of response models, so Resend needs an entry in all three to be visible and documented. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Identity comes from the JWT access token rather than a userinfo call, so the claim decoding is the adapter's own logic and carries its own failure modes: base64url segments, unpadded input, and callback-reachable tokens that must not raise. Also pins the documented token request shape, which sends the client id via Basic auth only. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
Send client_id and client_secret in the request body instead of a Basic authorization header, matching clients registered with the client_secret_post token endpoint auth method. Co-Authored-By: Claude Fable 5 <[email protected]>
Meldiron
marked this pull request as ready for review
August 27, 2026 15:59
Contributor
Greptile SummaryAdds Resend as an OAuth2 provider with mandatory PKCE, JWT access-token identity extraction, credential validation, project configuration endpoints, and response-model registration.
Confidence Score: 5/5The PR appears safe to merge based on the available follow-up review evidence. No blocking failure remains. Important Files Changed
Reviews (3): Last reviewed commit: "Bump utopia-php/migration to 2.0.5" | Re-trigger Greptile |
Picks up the 'resend' entry in the OAuth2 provider migration allow-list (utopia-php/migration#223), fixing the Migrations E2E failure "No migration resource for OAuth2 provider 'resend'". Co-Authored-By: Claude Fable 5 <[email protected]>
This was referenced Sep 8, 2026
imtia33
pushed a commit
to imtia33/appwrite
that referenced
this pull request
Oct 15, 2026
Appwrite server is adding a built-in 'resend' OAuth2 provider (appwrite#13366). Without an entry in the PROVIDERS allow-list, migrations report "No migration resource for OAuth2 provider 'resend'; skipped." and the transfer fails. Only clientId migrates (to the resendAppid attribute); clientSecret is write-only and stays redacted per the existing policy. Co-Authored-By: Claude Fable 5 <[email protected]>
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.
To create client:
What does this PR do?
Adds Resend as an OAuth2 social sign-in provider. Related to #13347 (Resend part).
Resend runs a standard OAuth 2.1 authorization server at
api.resend.com/oauth(client guide, server metadata). Three provider quirks shaped the adapter:PKCEtrait exactly like Kick — verifier encrypted into thestate, restored inparseState().getUserID()decodes the JWT payload (base64url) and readssub. The token arrives over TLS directly from the token endpoint and is never used to authorize anything on our side, so the signature is not verified. Email and name are not exposed, sogetUserEmail()/getUserName()return empty andisEmailVerified()isfalse— supported since email became optional in feat(account): make email optional for OAuth2 account linking #13255.full_accessandemails:send, and omitting scope grants both, so the adapter pinsemails:sendas the least-privilege default.The adapter is a confidential client:
client_secret_postauthentication (client_id + client_secret in the token request body) plus PKCE.verifyCredentials()follows the HuggingFace pattern (#13123) with one deliberate deviation, validated live against the endpoint: Resend validates request shape before authenticating the client, so a non-URLredirect_urireturnsinvalid_requesteven for bogus credentials and would mask them. With a well-formed URL, bogus credentials correctly returninvalid_client, so the probe uses a URL-shaped invalid redirect (commented in code).Changes
src/Appwrite/Auth/OAuth2/Resend.php— the adapterapp/config/oAuthProviders.php—resendprovider entryProject/Http/Project/OAuth2/Resend/Update.php+Project/Services/Http.php— consoleupdateOAuth2ResendendpointResponse.php(MODEL_OAUTH2_RESEND),Response/Model/OAuth2Resend.php,app/init/models.php— response modeltests/unit/Auth/OAuth2/PKCETest.php— Resend added to the PKCE provider matrixNotes
icon-resendasset (same follow-up as when Kick landed).Test Plan
tests/unit/suite passes (1079 tests, 16113 assertions);tests/unit/Auth/OAuth2/fully clean at 47/47 including 8 newresendPKCE data sets.https://api.resend.com/oauth/tokento confirm theverifyCredentials()error contract (invalid_clientfor unknown credentials,invalid_requestwhen the redirect is not a URL).Related PRs and Issues
🤖 Generated with Claude Code