Repository navigation
feat: add prompt to project OAuth2 provider settings - #13905
Merged
Merged
Conversation
Contributor
|
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Meldiron
force-pushed
the
feat-oauth2-prompt
branch
from
September 25, 2026 09:24
775cf2b to
581cbcb
Compare
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…h2 settings Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This was referenced Oct 8, 2026
2 tasks done
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 a
promptsetting to the project OAuth2 config of every provider that documents apromptauthorize parameter. Google and OIDC already had one, and this follows the same pattern:updateOAuth2Auth0none,login,consentupdateOAuth2Discordnone,consentupdateOAuth2GitHubselect_accountupdateOAuth2Kakaonone,login,create,select_accountupdateOAuth2Microsoftnone,login,consent,select_accountupdateOAuth2Oktanone,login,consentupdateOAuth2Salesforcelogin,consentupdateOAuth2ZohoconsentIn every case
nonehas to be the only value. An empty array goes back to the provider's default. Each provider's response model returnsprompt, and the console OAuth2 provider metadata lists it as a parameter. The adapter addspromptto the authorize URL only when it's set.Implementation
Baseaction getsgetPromptValues(). A provider that returns values gets thepromptparam, SDK enumProjectOAuth2{Provider}Prompt, a generated description, the response field and theupdateWithPromptcallback. That covers Discord, GitHub, Kakao, Salesforce and Zoho.promptto that JSON.{clientSecret, prompt}), like Google. Their adapters still accept a plain-string secret, so existing projects, and the VCS GitHub app that passes a plain secret, keep working without a migration. Token requests andverifyCredentialsnow read the secret throughgetClientSecret().Community request:
prompt=nonefor Discord, so users who already authorized the app skip Discord's authorization screen. Discord's docs describepromptas controlling "how the authorization flow handles existing authorizations". They don't say whatnonedoes for a first-time user, so that should be checked against a real Discord app before merging.Follow-ups
utopia-php/migrationallow-lists which OAuth2 fields get migrated. It copies Google'spromptbut not the new ones, so migrations will drop them until that list is updated.TypeErrorwhen the token response has noid_token. That behavior predates this PR and is out of scope. The unit test fake returns anid_token.Test Plan
tests/unit/Auth/OAuth2/for Auth0, Discord, GitHub, Kakao, Microsoft, Okta, Salesforce and Zoho: the login URL includespromptonly when set, with each provider's separator. For the providers that switched to JSON, the token request sends the real client secret for both plain and JSON secrets. All 93 OAuth2 unit tests pass locally.action().testUpdateOAuth2Promptruns for every provider above: the prompt is saved and read back, an empty array clears it, and an unknown value returns 400. For providers that don't verify credentials against their real API when enabled (Auth0, Discord, Okta, Salesforce, Zoho), it also checks thatGET /v1/account/sessions/oauth2/:providersends the prompt in its redirect.testUpdateOAuth2PromptNoneMustBeAlonecovers thenonerule.ConsoleConsoleClientTestnow expects GitHub's thirdpromptparameter. The e2e tests haven't been run locally; they'll first run in CI.Related PRs and Issues
🤖 Generated with Claude Code