'Cannot login with the Firebase CLI
I have a problem when I try to login to Firebase using the CLI. I installed firebase-tools
using npm -g install firebase-tools
with admin rights. The steps I do are (from a cygwin terminal on Windows 10 Professional):
firebase login --no-localhost
After this I get the message:
Visit the URL on any device....
Paste authentication code here:
Then, on my browser, I see Google asking if I give Firebase CLI access rights, I say yes and then I get an authorization code displayed on the browser.
I copy this code into the cygwin console and then:
Error: Authentication Error.
I'm at a total loss for this and it's completely stalling my efforts to get to know Firebase. All help gratefully appreciated.
Solution 1:[1]
Try:
firebase login --interactive
it will open up a browser window to authenticate.
Solution 2:[2]
On windows 10, I had issues with my firebase login through cli. I had to run my command line as the administrator and it worked.
Solution 3:[3]
In my case was bug in terminal in Visual Studio Code. On CMD terminal it start works.
Solution 4:[4]
I got the same issue today and it was because back in the day I used firebase and didn't remove this define from my bash_profile
FIREBASE_TOKEN
try echo $FIREBASE_TOKEN if something shows up try deleting, open new terminal and re-authenticating
This works for me.
Solution 5:[5]
my FIREBASE_TOKEN was FIREBASE_TOKEN=' '. I logged out of all my terminal sessions and tried again and that worked.
Solution 6:[6]
Just run the cmd wit administrator privilege...! Happy coding
Solution 7:[7]
If you really can't log in with firebase CLI using the "firebase login" command
Then, use GitBash instead of PowerShell in the VS code or any other code editor terminal. First, download Git SCM then use gitbash in the terminal for any kind of Firebase hosting command terminal image using gitBash
It does work actually!!
Solution 8:[8]
I used with cmd, it was worked.
Solution 9:[9]
I copy pasted the link into an incognito window, and somehow it worked.
Solution 10:[10]
After running across this problem I tried multiple different things to solve this:
- Used firebase login --reauth
- Used firebase login --no-localhost
- Turned off proxy settings
- Ran command from within windows/system32
- Turned off my security settings in Firefox
All these options listed above worked for others but not for me
Finally the way it worked was to install google chrome and run the command from from chrome instead of firefox
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow