user441058
user441058

Reputation: 1278

firebase hosting - terminal hangs waiting for authentication

I just created a firebase account using my Gmail account and I want to test deploying a simple JS app to the cloud. I'm using Linux. I type in firebase init and the terminal says, "Waiting for authentication" then the browser opens and for a quick second I see a message "Authenticate Application" but then it disappears and asks me to login to my Google account. I login and it redirects me to my dashboard. In the terminal window it is still waiting for authentication. So the browser never tells the terminal window that I logged in and is stuck.

Any ideas?

Upvotes: 4

Views: 3821

Answers (2)

user6342440
user6342440

Reputation: 186

I found a different thread with an answer that worked for me (How to login to `firebase-tools` on headless remote server?)

  1. On the terminal use the following command: $ firebase login --no-localhost

  2. A different authentication link will be generated. On any machine, open a browser and paste the link from the terminal.

  3. The result is an authorization code that you now need to paste into the terminal.

Everything should work well...I hope...

Upvotes: 11

Charles Dominic
Charles Dominic

Reputation: 345

before firebase init you should be logged in (firebase login)

if you hit firebase login

first your cli asks permission to allow firebase

Allow Firebase to collect anonymous CLI usage information?

type yes and hit return

now an url will be generated

copy the url and open in any browser

login (if required)

if you are using first it asks for permission when you hit ok

login successful

Upvotes: -2

Related Questions