Skip to content

fix: deploy via FIREBASE_TOKEN; revert WIF (firebase-tools#3926) - #44

Merged
MyAlterLego merged 1 commit into
release/v9from
fix/deploy-auth-firebase-token
Jun 25, 2026
Merged

fix: deploy via FIREBASE_TOKEN; revert WIF (firebase-tools#3926)#44
MyAlterLego merged 1 commit into
release/v9from
fix/deploy-auth-firebase-token

Conversation

@MyAlterLego

Copy link
Copy Markdown
Collaborator

Root cause (2026-06-25 incident)

firebase apphosting:rollouts:create intermittently fails Failed to authenticate on GitHub hosted runners using SA-key ADC — across all projects (tmi AND atlas), while the same key authenticates fine locally and apphosting:backends:list works. SA-key auth signs a JWT (iat/exp) → clock-skew-sensitive on the runner fleet. Refresh-token (FIREBASE_TOKEN) auth isn't JWT-signed, so it sidesteps the failure (verified: direct rollout with a user token succeeds).

Changes

Rollout

Set the FIREBASE_TOKEN secret (from firebase login:ci) on a repo to switch it; leave unset to keep SA-key behavior. Canary = tmi.

Refs #42

Reverts the WIF dual-path (#43): firebase-tools 15.22.2 rejects WIF
external_account credentials (firebase-tools#3926), so it could never work.

Root cause of the deploy flake (2026-06-25): `firebase apphosting:rollouts:create`
intermittently fails "Failed to authenticate" on hosted runners with SA-key ADC,
across all projects (tmi AND atlas), while the SAME key authenticates fine locally
and `apphosting:backends:list` works. The SA-key path signs a JWT (iat/exp), so it's
clock-skew sensitive on the runner fleet; refresh-token (FIREBASE_TOKEN) auth is not
JWT-signed and sidesteps it.

Adds optional job-level FIREBASE_TOKEN env to deploy-firebase.yml. Empty (secret
unset) => CLI ignores it and uses the SA key as before, so repos opt in per-repo by
setting the FIREBASE_TOKEN secret (from `firebase login:ci`).

Refs shared-workflows#42

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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