Fix : Render provider (support OAuth + new GraphQL behavior)#344
Closed
Oscar-Quiloulou wants to merge 1 commit into
Closed
Fix : Render provider (support OAuth + new GraphQL behavior)#344Oscar-Quiloulou wants to merge 1 commit into
Oscar-Quiloulou wants to merge 1 commit into
Conversation
… GraphQL behavior
Render removed all legacy email validation mutations (validateEmail, checkEmail,
validateSignup). The only remaining mutation is `signUp`, which returns structured
errors indicating the email state.
This patch updates the provider to use `signUp` and correctly interpret all
possible responses:
- {"email":"exists"} → classic Render account (email+password)
- {"email":"invalid"} → OAuth-only account (GitHub/Google) → treat as taken
- {"hcaptcha_token":"invalid"} → valid but unused email → available
Also adds required x-render-client-* headers to avoid GraphQL validation errors.
This makes the Render provider fully functional again and compatible with both
classic and OAuth-based accounts.
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
This PR updates the Render provider to support both classic email‑password accounts and OAuth‑based accounts (GitHub / Google), following Render’s recent GraphQL changes.
Render removed all legacy validation mutations and now exposes only the
signUpmutation. This mutation always returns a GraphQL error, but the error message contains a JSON payload that reveals the actual email state.This patch restores correct behavior for detecting:
existing emails (classic accounts)
existing emails (OAuth accounts)
available emails
It also adds the internal
x-render-client-*headers required by Render’s new API.🔍 Background
Render recently changed its GraphQL API:
all legacy mutations (
validateEmail,checkEmail,validateSignup) were removedsignUpis now the only mutation that exposes email existencesignUpalways returns an error, but the error message contains structured JSONOAuth accounts (GitHub/Google) are not stored in the same table as classic accounts
therefore, OAuth emails return
"email":"invalid"even though they existRender’s current behavior returns one of the following payloads inside the GraphQL error:
These correspond to:
🔧 Changes
replaced all deprecated mutations with
signUpadded required
x-render-client-*headersparsed JSON error payloads returned by Render
treated OAuth accounts (
"email":"invalid") as takenimproved compatibility with Render’s current API
💡 Why this matters
Before this patch, the Render provider always failed with:
or incorrectly marked OAuth accounts as invalid.
With this fix, the provider correctly detects:
classic accounts
OAuth accounts
available emails
and is fully functional again.
🧪 Testing
Tested against:
classic Render accounts
OAuth GitHub accounts
non‑existent emails
random valid emails
All cases return the correct result.