Skip to content

ci: inject OAuth client ids and flags into the frontend build#237

Merged
parth0025 merged 1 commit into
stagingfrom
ci/oauth-frontend-build-env
Jun 11, 2026
Merged

ci: inject OAuth client ids and flags into the frontend build#237
parth0025 merged 1 commit into
stagingfrom
ci/oauth-frontend-build-env

Conversation

@parth0025

Copy link
Copy Markdown
Collaborator

Root cause

The Google/GitHub/GitLab buttons never appeared on staging even though they work locally. Reason: the frontend bundle is built on the GitHub Actions runner (the validate job runs npm run build, then the artifact is shipped to the VPS). frontend/.env is gitignored, so on the runner the only VUE_APP_* values are the ones explicitly mapped from secrets in the build step β€” and the OAuth vars were missing from that map. So the shipped bundle had every VUE_APP_IS_*_LOGIN flag undefined β†’ no buttons. Editing frontend/.env on the server has no effect, because the server never builds the bundle.

Fix

Map the OAuth enable-flags and client ids from GitHub secrets in the build step (same pattern as the Firebase vars), and pin the constant github.com / gitlab.com OAuth base URLs.

⚠️ Required before buttons appear β€” set these GitHub repository secrets

Settings β†’ Secrets and variables β†’ Actions β†’ New repository secret:

Secret Value
VUE_APP_IS_GOOGLE_LOGIN true
VUE_APP_GOOGLE_CLIENT_ID the Google client id used for staging
VUE_APP_IS_GITHUB_LOGIN true
VUE_APP_GITHUB_CLIENT_ID the GitHub client id used for staging
VUE_APP_IS_GITLAB_LOGIN true
VUE_APP_GITLAB_CLIENT_ID the GitLab application id used for staging

Note: the OAuth apps must also list the staging origin/redirect (https://staging-app.alianhub.com). GitHub OAuth Apps allow only one callback URL, so staging likely needs its own GitHub app (separate client id) β€” Google/GitLab can add staging as an extra redirect on the same app.

After the secrets are set, trigger a redeploy (Actions β†’ Run workflow, enabled by #236) to rebuild with them.

πŸ€– Generated with Claude Code

The login/signup buttons never appeared on staging because the frontend
bundle is built on the CI runner, where the gitignored frontend/.env is
absent, and the OAuth VUE_APP_* vars were not mapped from secrets like
the Firebase ones. Map the three providers enable-flags and client ids
from GitHub secrets, and pin the constant github.com / gitlab.com OAuth
base URLs, so the shipped bundle actually shows and wires the buttons.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

βš™οΈ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1bd5ec95-3384-4b42-b10f-9fc982cd824d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • πŸ” Trigger review
✨ Finishing Touches
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/oauth-frontend-build-env

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

@parth0025 parth0025 merged commit 6599035 into staging Jun 11, 2026
4 checks passed
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