'How to get authorisation code during angularfire installation?
During installation AngularFire by ng add @angular/fire I get following error
? Paste authorization code here: 1//0cpKD...
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
I try do put different code-like string from firebase site but no luck. I also try to run firebase login:ci, this generate long url, I copy it to browser and login to my google account, accept, and copy quite long token - but still no luck - it is wrong. How to get right authorization code?
Solution 1:[1]
I found following solution:
- Run
firebase login:ci --no-localhost - and open in browser generated link, login to your google account and accept
- copy code (which is few times shorter than token (~62 chars)
- TRICK: do NOT PASTE that code to console - but open new separate console
- In new console run
ng add @angular/fire - and paste that code during installation - now error not appear
Solution 2:[2]
What worked for me was to login to firebase.
So my steps that worked were following:
- Run
firebase login:ciand follow instructions - Run
firebase login-> select your account, project etc... - Run
ng add @angular/fire-> it should ask you for what account to use, instead asking for authorization code
Had this issue today, first time using Firebase.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Dharman |
