firebase / firebase/firebase-tools
Firebase login is not working
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
### [REQUIRED] Environment info
firebase --version
12.4.2
**firebase-tools:**
macOS
**Platform:**
### [REQUIRED] Test case
vishnu.duggisetty ~ % firebase --debug login
i Firebase optionally collects CLI and Emulator Suite usage and error reporting information to help improve our products. Data is collected in accordance with Google's privacy policy (https://policies.google.com/privacy) and is not used to identify you.
? Allow Firebase to collect CLI and Emulator Suite usage and error reporting
information? Yes
i To change your data collection preference at any time, run `firebase logout` and log in again.
Visit this URL on this device to log in:
https://accounts.google.com/o/oauth2/auth?client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com&scope=email%20openid%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloudplatformprojects.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffirebase%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform&response_type=code&state=371796461&redirect_uri=http%3A%2F%2Flocalhost%3A9005
Waiting for authentication...
[2023-06-29T12:31:31.876Z] >>> [apiv2][query] POST https://accounts.google.com/o/oauth2/token [none]
[2023-06-29T12:31:31.876Z] >>> [apiv2][body] POST https://accounts.google.com/o/oauth2/token [omitted]
[2023-06-29T12:31:32.093Z] Token Fetch Error: FirebaseError: Failed to make request to https://accounts.google.com/o/oauth2/token
at RetryOperation._fn (/usr/local/lib/node_modules/firebase-tools/lib/apiv2.js:242:31)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2023-06-29T12:31:32.101Z] >>> [apiv2][query] POST https://auth.firebase.tools/attest [none]
[2023-06-29T12:31:32.102Z] >>> [apiv2][body] POST https://auth.firebase.tools/attest {"session_id":"acc1475e-717a-4072-b3f7-69ee2331c133"}
[2023-06-29T12:31:32.747Z] <<< [apiv2][status] POST https://auth.firebase.tools/attest 200
[2023-06-29T12:31:32.747Z] <<< [apiv2][body] POST https://auth.firebase.tools/attest {"token":"y7MBhtXTNjZsKaSWqv3lS6k2Uoi1KPxQIlf4_QhDm30"}
To sign in to the Firebase CLI:
1. Take note of your session ID:
ACC14
2. Visit the URL below on any device and follow the instructions to get your code:
https://auth.firebase.tools/login?code_challenge=hBO7VybJaegihs0OFNr2YolrSMUQ0cv1uKCgSDuw3aQ&session=acc1475e-717a-4072-b3f7-69ee2331c133&attest=y7MBhtXTNjZsKaSWqv3lS6k2Uoi1KPxQIlf4_QhDm30
3. Paste or enter the authorization code below once you have it:
? Enter authorization code:
4/0AZEOvhXVrE0XoxVSNYcK42j7LDeq_LtccxVKmMEgQgLk8OGhlMPvQcyNj9eZIwAu8LQ0rA
[2023-06-29T12:33:47.103Z] >>> [apiv2][query] POST https://accounts.google.com/o/oauth2/token [none]
[2023-06-29T12:33:47.117Z] >>> [apiv2][body] POST https://accounts.google.com/o/oauth2/token [omitted]
[2023-06-29T12:33:47.403Z] Token Fetch Error: FirebaseError: Failed to make request to https://accounts.google.com/o/oauth2/token
at RetryOperation._fn (/usr/local/lib/node_modules/firebase-tools/lib/apiv2.js:242:31)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Error: Unable to authenticate using the provided code. Please try again.
### [REQUIRED] Steps to reproduce
1. firebase login/firebase login --no-localhost
2. copied the link and acceepted the popup
3. entered the auth code
4. giving error
### [REQUIRED] Expected behavior
Accept and login
### [REQUIRED] Actual behavior
firebase --debug login
i Firebase optionally collects CLI and Emulator Suite usage and error reporting information to help improve our products. Data is collected in accordance with Google's privacy policy (https://policies.google.com/privacy) and is not used to identify you.
? Allow Firebase to collect CLI and Emulator Suite usage and error reporting
information? Yes
i To change your data collection preference at any time, run `firebase logout` and log in again.
Visit this URL on this device to log in:
https://accounts.google.com/o/oauth2/auth?client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com&scope=email%20openid%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloudplatformprojects.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffirebase%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform&response_type=code&state=371796461&redirect_uri=http%3A%2F%2Flocalhost%3A9005
Waiting for authentication...
[2023-06-29T12:31:31.876Z] >>> [apiv2][query] POST https://accounts.google.com/o/oauth2/token [none]
[2023-06-29T12:31:31.876Z] >>> [apiv2][body] POST https://accounts.google.com/o/oauth2/token [omitted]
[2023-06-29T12:31:32.093Z] Token Fetch Error: FirebaseError: Failed to make request to https://accounts.google.com/o/oauth2/token
at RetryOperation._fn (/usr/local/lib/node_modules/firebase-tools/lib/apiv2.js:242:31)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2023-06-29T12:31:32.101Z] >>> [apiv2][query] POST https://auth.firebase.tools/attest [none]
[2023-06-29T12:31:32.102Z] >>> [apiv2][body] POST https://auth.firebase.tools/attest {"session_id":"acc1475e-717a-4072-b3f7-69ee2331c133"}
[2023-06-29T12:31:32.747Z] <<< [apiv2][status] POST https://auth.firebase.tools/attest 200
[2023-06-29T12:31:32.747Z] <<< [apiv2][body] POST https://auth.firebase.tools/attest {"token":"y7MBhtXTNjZsKaSWqv3lS6k2Uoi1KPxQIlf4_QhDm30"}
To sign in to the Firebase CLI:
1. Take note of your session ID:
ACC14
2. Visit the URL below on any device and follow the instructions to get your code:
https://auth.firebase.tools/login?code_challenge=hBO7VybJaegihs0OFNr2YolrSMUQ0cv1uKCgSDuw3aQ&session=acc1475e-717a-4072-b3f7-69ee2331c133&attest=y7MBhtXTNjZsKaSWqv3lS6k2Uoi1KPxQIlf4_QhDm30
3. Paste or enter the authorization code below once you have it:
? Enter authorization code:
4/0AZEOvhXVrE0XoxVSNYcK42j7LDeq_LtccxVKmMEgQgLk8OGhlMPvQcyNj9eZIwAu8LQ0rA
[2023-06-29T12:33:47.103Z] >>> [apiv2][query] POST https://accounts.google.com/o/oauth2/token [none]
[2023-06-29T12:33:47.117Z] >>> [apiv2][body] POST https://accounts.google.com/o/oauth2/token [omitted]
[2023-06-29T12:33:47.403Z] Token Fetch Error: FirebaseError: Failed to make request to https://accounts.google.com/o/oauth2/token
at RetryOperation._fn (/usr/local/lib/node_modules/firebase-tools/lib/apiv2.js:242:31)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Error: Unable to authenticate using the provided code. Please try again.
Contributor guide
Assessment
This issue has not been assessed yet.