Skip to content

Hide internal OAuth providers from UI#2671

Merged
TorstenDittmann merged 1 commit intomainfrom
fix-internal-oauth-providers
Dec 5, 2025
Merged

Hide internal OAuth providers from UI#2671
TorstenDittmann merged 1 commit intomainfrom
fix-internal-oauth-providers

Conversation

@TorstenDittmann
Copy link
Copy Markdown
Contributor

@TorstenDittmann TorstenDittmann commented Dec 5, 2025

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.)

Summary by CodeRabbit

  • Bug Fixes
    • Fixed OAuth provider selection to exclude internal-only providers from user-facing options, ensuring only applicable providers appear in the authentication settings interface.

✏️ Tip: You can customize this high-level summary in your review settings.

@appwrite
Copy link
Copy Markdown

appwrite Bot commented Dec 5, 2025

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code

Tip

Global CDN and DDoS protection come free with every Sites deployment

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 5, 2025

Walkthrough

The changes introduce an optional internal flag to the Provider type definition and add two new OAuth providers (githubImagine and googleImagine) marked as internal. The OAuth settings page UI is updated to filter out providers flagged as internal, preventing them from appearing in the provider selection interface.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Type modification is minimal and non-breaking (optional flag addition)
  • New provider entries follow a homogeneous pattern, consistent with existing entries
  • UI filtering change is a single conditional adjustment in one file
  • Low logic density with straightforward intent

Areas to review:

  • Verify the internal: true flag is consistently applied to both new providers
  • Confirm the UI filter condition (!oAuthProvider.internal) correctly gates internal providers from display
  • Ensure the new internal providers serve their intended purpose elsewhere in the codebase if applicable

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Hide internal OAuth providers from UI' directly and clearly describes the main change: adding an internal flag to OAuth providers and filtering them from UI display.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-internal-oauth-providers

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 76f4ec1 and 231613a.

📒 Files selected for processing (2)
  • src/lib/stores/oauth-providers.ts (3 hunks)
  • src/routes/(console)/project-[region]-[project]/auth/settings/+page.svelte (1 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{ts,tsx,js,jsx,svelte}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx,svelte}: Import reusable modules from the src/lib directory using the $lib alias
Use minimal comments in code; reserve comments for TODOs or complex logic explanations
Use $lib, $routes, and $themes aliases instead of relative paths for module imports

Files:

  • src/lib/stores/oauth-providers.ts
  • src/routes/(console)/project-[region]-[project]/auth/settings/+page.svelte
**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.ts: Define types inline or in .d.ts files, avoid creating separate .types.ts files
Use TypeScript in non-strict mode; any type is tolerated in this project

Files:

  • src/lib/stores/oauth-providers.ts
**/*.{ts,tsx,js,jsx,svelte,json}

📄 CodeRabbit inference engine (AGENTS.md)

Use 4 spaces for indentation, single quotes, 100 character line width, and no trailing commas per Prettier configuration

Files:

  • src/lib/stores/oauth-providers.ts
  • src/routes/(console)/project-[region]-[project]/auth/settings/+page.svelte
src/routes/**/*.svelte

📄 CodeRabbit inference engine (AGENTS.md)

Use SvelteKit file conventions: +page.svelte for components, +page.ts for data loaders, +layout.svelte for wrappers, +error.svelte for error handling, and dynamic route params in square brackets like [param]

Files:

  • src/routes/(console)/project-[region]-[project]/auth/settings/+page.svelte
**/*.svelte

📄 CodeRabbit inference engine (AGENTS.md)

Use Svelte 5 + SvelteKit 2 syntax with TypeScript for component development

Files:

  • src/routes/(console)/project-[region]-[project]/auth/settings/+page.svelte
src/routes/**

📄 CodeRabbit inference engine (AGENTS.md)

Configure dynamic routes using SvelteKit convention with [param] syntax in route directory names

Files:

  • src/routes/(console)/project-[region]-[project]/auth/settings/+page.svelte
🧠 Learnings (1)
📚 Learning: 2025-11-19T11:22:42.553Z
Learnt from: atharvadeosthale
Repo: appwrite/console PR: 2512
File: src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte:51-83
Timestamp: 2025-11-19T11:22:42.553Z
Learning: In src/routes/(console)/project-[region]-[project]/overview/platforms/llmBanner.svelte, the Lovable integration URL format `https://lovable.dev/` with `autosubmit` and `prompt` as query parameters (set via searchParams) is correct and functional.

Applied to files:

  • src/routes/(console)/project-[region]-[project]/auth/settings/+page.svelte
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: e2e
🔇 Additional comments (3)
src/lib/stores/oauth-providers.ts (2)

16-16: LGTM: Type definition follows best practice.

Using internal?: true as a literal type rather than internal?: boolean is the correct pattern for optional flags that should only be explicitly set to true, never false.


117-123: These internal providers serve an intentional purpose and are properly filtered from the UI.

The githubImagine and googleImagine providers are not problematic duplicates. They are intentionally marked as internal: true and are filtered from the standard UI in auth/settings/+page.svelte via the check {#if oAuthProvider && !oAuthProvider.internal}. These appear to support Appwrite's "Imagine" feature and are actively maintained with clear separation from their public counterparts. The architecture appropriately isolates them from standard provider listings.

A brief comment explaining their "Imagine" feature purpose would improve code clarity per the project's guidelines, but the current implementation is sound.

Likely an incorrect or invalid review comment.

src/routes/(console)/project-[region]-[project]/auth/settings/+page.svelte (1)

80-80: No backend verification needed—the UI filtering already prevents access to internal providers.

The code correctly guards internal provider access at the UI level. The selectedProvider variable can only be assigned from providers that pass the !oAuthProvider.internal check (line 80), so the modal component at lines 118-127 cannot render internal providers in normal operation. The filter is sufficient for this use case.

Likely an incorrect or invalid review comment.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@TorstenDittmann TorstenDittmann merged commit 1b7299e into main Dec 5, 2025
3 of 4 checks passed
@TorstenDittmann TorstenDittmann deleted the fix-internal-oauth-providers branch December 5, 2025 10:35
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