Skip to content

feat(console): allow Google sign-in to the console project - #13385

Open
HarshMN2345 wants to merge 1 commit into
mainfrom
feat/console-google-oauth
Open

feat(console): allow Google sign-in to the console project#13385
HarshMN2345 wants to merge 1 commit into
mainfrom
feat/console-google-oauth

Conversation

@HarshMN2345

Copy link
Copy Markdown
Member

What

Adds a Google slot to the console project's oAuthProviders, matching the GitHub/GitLab/Bitbucket entries added previously.

Why

The console UI already ships a Sign in with Google button, but the API returns:

412  project_provider_disabled  "This provider is disabled."

because the console project has no googleEnabled / googleAppid / googleSecret keys — there's nowhere to put credentials. Same gap GitLab and Bitbucket had before #13337.

google is already a supported provider in app/config/oAuthProviders.php, so no adapter work is needed.

Deploying

Set on the console environment, with the OAuth client's redirect URI as /v1/account/sessions/oauth2/callback/google/console:

_APP_CONSOLE_GOOGLE_APP_ID
_APP_CONSOLE_GOOGLE_SECRET

Unlike GitLab, Google's secret is a plain string — no JSON wrapping.

Matching cloud-side change: appwrite-labs/cloud (same branch name).

Test plan

  • php -l clean
  • With credentials set, /v1/account/sessions/oauth2/google 301s to accounts.google.com
  • GitHub/GitLab/Bitbucket sign-in unaffected

Adds a Google slot to the console project's oAuthProviders, following the
same {provider}Enabled / {provider}Appid / {provider}Secret contract that
app/controllers/api/account.php reads at sign-in.

Without it createOAuth2Session('google') fails the Enabled check with
project_provider_disabled, which is what the console currently returns
even though the UI ships a Google button.
@greptile-apps

greptile-apps Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds environment-backed Google OAuth credentials to the built-in console project, enabling console Google sign-in when both credentials are configured.

  • Adds the Google provider to the console project's OAuth provider map.
  • Reads the Google client ID and secret from _APP_CONSOLE_GOOGLE_APP_ID and _APP_CONSOLE_GOOGLE_SECRET.
  • Retains the existing provider-disabled response when either credential is absent.

Confidence Score: 5/5

The PR appears safe to merge, with Google following the existing console OAuth configuration and credential-validation behavior.

The account OAuth flow consumes the added console-project fields and rejects missing client IDs or secrets before redirecting, while configured credentials enable the intended Google sign-in path.

Important Files Changed

Filename Overview
app/config/console.php Adds Google using the same enabled flag and environment-backed credential pattern as the existing GitHub, GitLab, and Bitbucket console OAuth providers; no actionable defect was identified.

Reviews (1): Last reviewed commit: "feat(console): allow Google sign-in to t..." | Re-trigger Greptile

@github-actions

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → feat/console-google-oauth (after).

Metric Before After Change
🚀 Requests/sec 227.21 219.66 -3.3%
⏱️ Latency P50 78.91 ms 83.05 ms 🔴 +5.2%
⏱️ Latency P95 172.15 ms 174.74 ms +1.5%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 83.05 174.74 13,680 219.66 +2.59
Account 137.92 272.5 720 12.16 -19.97
TablesDB 85.1 151.89 7,440 121.14 +7.72
Storage 67.89 147.49 3,600 61 +15.15
Functions 101.51 198.61 1,920 33.35 -10.57

Top API waits (after)

API request Max wait (ms)
storage.buckets.delete 416.46
functions.variables.update 392.69
storage.buckets.create 387.03
functions.create 377.37
account.get 369.87

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.

1 participant