Skip to content

feat: Google OAuth prompt parameter and login OAuth error display#3056

Merged
HarshMN2345 merged 7 commits into
mainfrom
feat-google-oauth-prompt
May 21, 2026
Merged

feat: Google OAuth prompt parameter and login OAuth error display#3056
HarshMN2345 merged 7 commits into
mainfrom
feat-google-oauth-prompt

Conversation

@HarshMN2345
Copy link
Copy Markdown
Member

  • Add dedicated googleOAuth.svelte modal with prompt picker in Advanced section
  • Add googlePromptPicker.svelte: tag-based multi-select enforcing none exclusivity
  • Wire prompt array through updateOAuth.ts to updateOAuth2Google SDK call
  • Fix OIDC advanced param detection to URL-based logic (all URL params except wellKnownURL)
  • Show OAuth failure URL error message on login page via onMount

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

- Add dedicated googleOAuth.svelte modal with prompt picker in Advanced section
- Add googlePromptPicker.svelte: tag-based multi-select enforcing none exclusivity
- Wire prompt array through updateOAuth.ts to updateOAuth2Google SDK call
- Fix OIDC advanced param detection to URL-based logic (all URL params except wellKnownURL)
- Show OAuth failure URL error message on login page via onMount
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 21, 2026

Greptile Summary

This PR introduces a dedicated Google OAuth2 settings modal with a tag-based prompt picker (none, consent, select_account with none-exclusivity enforced), wires promptValues through updateOAuth.ts to the SDK call, reorders the Advanced accordion in the generic OIDC modal, and shows a hardcoded error notification on the login page when redirected back with a ?message parameter.

  • googleOAuth.svelte and googlePromptPicker.svelte are new Google-specific components that replace the generic mainOAuth.svelte for the google and googleImagine providers; prompt state is initialised from the provider object via an untyped cast and compared order-independently via .sort().join(',').
  • updateOAuth.ts adds an optional promptValues field with a safe ?? [] fallback, keeping all other providers unaffected.
  • The login page onMount reflects a safe, hardcoded message string rather than the raw URL parameter value.

Confidence Score: 5/5

The change is well-scoped: the new Google component mirrors patterns from mainOAuth.svelte, the prompt array wiring is isolated to the Google SDK call, and the login page notification uses a hardcoded string rather than reflecting URL content.

All changed paths are additive or narrowly scoped. The prompt picker logic is straightforward, the updateOAuth.ts threading is non-breaking for all other providers, and the login page fix avoids user-controlled content in the notification. No defects were found that would affect data integrity or user-facing correctness.

googlePromptPicker.svelte uses Svelte 5 runes syntax while the rest of the provider files use Svelte 4 — worth aligning before the codebase fully migrates.

Important Files Changed

Filename Overview
src/routes/(console)/project-[region]-[project]/auth/(providers)/googleOAuth.svelte New Google-specific OAuth modal with prompt picker and write-only secret UX; initialises prompt from provider data via an untyped cast; otherwise consistent with mainOAuth.svelte patterns
src/routes/(console)/project-[region]-[project]/auth/(providers)/googlePromptPicker.svelte Tag-based multi-select with correct none-exclusivity logic; mixes Svelte 5 runes props with Svelte 4 on:click event directive
src/routes/(console)/project-[region]-[project]/auth/updateOAuth.ts Adds optional promptValues to Args and threads it through to updateOAuth2Google with a safe ?? [] fallback; no issues found
src/routes/(console)/project-[region]-[project]/auth/(providers)/mainOAuth.svelte Moves Advanced accordion below the secret input section and updates isOidcAdvancedParam to a URL-substring heuristic (already discussed in prior review thread)
src/lib/stores/oauth-providers.ts Swaps both google and googleImagine providers to use the new Google-specific component; straightforward substitution
src/routes/(public)/(guest)/login/+page.svelte Adds onMount to show a hardcoded error notification when the ?message parameter is present after an OAuth redirect; does not reflect the URL value directly

Reviews (2): Last reviewed commit: "format" | Re-trigger Greptile

Comment thread src/routes/(public)/(guest)/login/+page.svelte
@HarshMN2345 HarshMN2345 merged commit a15c452 into main May 21, 2026
4 checks passed
@HarshMN2345 HarshMN2345 deleted the feat-google-oauth-prompt branch May 21, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants