Skip to content

Firebase login issue #10681

Description

@Purus

[REQUIRED] Environment info
Firebase CLI Version: 15.21.0
Node.js Version: v24.17.0
Windows 11 x64

[REQUIRED] Test case
Download firebase-tools and authenticate from the terminal

[REQUIRED] Steps to reproduce
Execute firebase login, firebase login --reauth, firebase login --no-localhost and basically all versions of authentication available. Including ones with login:ci

[REQUIRED] Expected behavior
The authentication should complete successfully within the terminal

[REQUIRED] Actual behavior
The CLI opens a browser window for authentication.
The browser displays the following error message:
Oops!
Firebase CLI Login Failed
The Firebase CLI login request was rejected or an error occurred. Please run firebase login again or contact support if you continue to have difficulty logging in.
Meanwhile, the terminal outputs the following logs:

C:\Users\purus>firebase login --no-localhost --reauth --debug
[2026-06-18T11:51:31.707Z] >>> [apiv2][query] POST https://auth.firebase.tools/attest [none]
[2026-06-18T11:51:31.708Z] >>> [apiv2][body] POST https://auth.firebase.tools/attest {"session_id":"7966cbb3-142a-46b4-b571-e92f722dcd9c"}
[2026-06-18T11:51:32.374Z] <<< [apiv2][status] POST https://auth.firebase.tools/attest 200
[2026-06-18T11:51:32.374Z] <<< [apiv2][body] POST https://auth.firebase.tools/attest {"token":"yJah2vT3KoOXOwvO7LZda_h8aE0tl5KTwiG68UK3CZQ"}

To sign in to the Firebase CLI:

1. Take note of your session ID:

   7966C

2. Visit the URL below on any device and follow the instructions to get your code:

   https://auth.firebase.tools/login?code_challenge=AeIjhcJ5ZQk9VfnNwNbDRz1Qnjj4qZt69Hb7Ek9oRvM&session=7966cbb3-142a-46b4-b571-e92f722dcd9c&attest=yJah2vT3KoOXOwvO7LZda_h8aE0tl5KTwiG68UK3CZQ

3. Paste or enter the authorization code below once you have it:

√ Enter authorization code: 4/0AdkVLPx31jGpY5NaS430JKunW2-w9iGknbn-O3Vpn6QYsWG-aJHqiUGX7w3b5VAzNMaNlA
[2026-06-18T11:51:57.133Z] >>> [apiv2][query] POST https://accounts.google.com/o/oauth2/token [none]
[2026-06-18T11:51:57.134Z] >>> [apiv2][body] POST https://accounts.google.com/o/oauth2/token [omitted]
[2026-06-18T11:51:57.312Z] Token Fetch Error: FirebaseError: FetchError: Invalid response body while trying to fetch https://accounts.google.com/o/oauth2/token: Premature close
    at RetryOperation._fn (F:\node-v24.17.0-win-x64\node_modules\firebase-tools\lib\apiv2.js:317:88)
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
Authentication Error: Your credentials are no longer valid. Please run firebase login --reauth

For CI servers and headless environments, generate a new token with firebase login:ci

Error: Unable to authenticate using the provided code. Please try again.

I tried to do a curl to the auth url as below.

C:\Users\purus>curl -X POST -I https://accounts.google.com/o/oauth2/token
HTTP/1.0 411 Length Required
Content-Type: text/html; charset=UTF-8
Referrer-Policy: no-referrer
Content-Length: 1564
Date: Thu, 18 Jun 2026 11:53:09 GMT

I have treid to change different wifi band, mobile data using hotspot too.. still the same issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions