简体   繁体   中英

Firebase login failed

I'm having troubles trying to migrate to new firebase console. I'm doing exactly what is on this link: https://firebase.google.com/support/guides/firebase-web#import_your_project_to_the_firebase_console_numbered

And this is what happened in the step 2: Firebase 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.

Any ideas? Thanks since now.

您应该尝试以下方法:

firebase login --no-localhost

A possible reason may be that you are using a proxy.

There is a issue on firebase: Unable to deploy behind a proxy

If you are using proxy, you can refer to this question to: Firebase in NodeJS with HTTP Proxy .

Not really an answer but further details that don't get formatted correctly in the Comments

I have the same issue at an initial login

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.

The Firebase CLI does not currently work behind a proxy.

We're aware of the issue but don't have a timeline for a fix. You can follow along with the tracked issue here: https://github.com/firebase/firebase-tools/issues/155

This will work most certainly!!!

Please try this command

set "NODE_TLS_REJECT_UNAUTHORIZED=0"

and then re-run,

firebase login

Note firebase CLI uses HTTP_PROXY variable if it is set in your environment. (you can run echo $HTTP_PROXY to verify) So make sure you are EITHER in a network with access to your proxy (eg corporate network) OR that you unset HTTP_PROXY in the terminal that you use for firebase. Otherwise you will get this misleading error that says “Authentication Error: Your credentials are no longer valid.”

You can logout with firebase logout and login in with firebase login . It solves the problem with ease.

For me this problem was coming due to network proxy before identification I tried all available solutions on internet.

This issue was there due to network proxy, due to proxy it could not get correct SSL. I requested my network team to direct my connection without proxy.

Hence, problem got solved!

Guessing that you are at workplace or behind a proxy. This a know error. You can follow the status of this issue here - https://github.com/firebase/firebase-tools/issues/155

For anyone else who might run across this issue and think to themselves, "But, I'm not behind a proxy...": I generally run Little Snitch . (Note, I don't work for LS, just use the product. This isn't intended as an ad.) After a few minutes of consideration, I realized that it is, in essence, a proxy. I switched it off (by clicking the "Stop Network Filter" option), and presto, I was able to login. Then I switched Little Snitch back on.

[Update]

I was trying to test Cloud Functions locally using firebase serve --only functions . Once I turned Little Snitch back on, I started getting:

Error: Authentication Error: Your credentials are no longer valid. Please run firebase login --reauth

So apparently, you can't serve functions locally from behind a proxy, either. Turning LS filtering back off fixed the issue. There's probably a whitelisting option I could use, but I haven't explored that yet. I'm just trying to get back to work at the moment.

For anyone who is forced to use a VPN provider to connect, like Astrill for example, you cant use OpenWeb protocol. Use StealthVPN. That solved the issue for me

You need to first add and enable Google provider in Authentication tab of your App before CLI for existing remote project created.

On CLI following worked for me :

  • npm install -g firebase-tools
  • firebase login
  • firebase init

On Firebase login you get Web interface login to Google account on web browser, then you are logged in.

你需要这样写你的电子邮件:

firebase login exmple@email.com

I have tried all of the suggestions above. None of them were successful.

The only thing that worked for me was rebooting my machine (restarting the terminal was not sufficient). Logging in worked flawlessly after that.

On CLI following worked for me:

Try out For Windows:

  • Search for PowerShell

  • run as PowerShell administrator

  • npm install -g firebase-tools

  • firebase login

  • firebase deploy

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM