Firebase tools login from command line

firebase login --no-localhost is what worked for me. You get the Authorisation code from browser which you need to paste into your terminal window.


See wvm2008's answer for a more up to date version

One option would be to mint a token for the build server and pass it into the CLI with:

firebase --token <token>

You can also get a token from a system where you interactively logged in with:

firebase login:ci

See this page for more options.


The accepted answer is correct for the old version of firebase-tools, however this has been deprecated as of version 3. The new command to get the token is:

firebase login:ci

You should save this in some kind of environment variable, ideally, FIREBASE_TOKEN.

Then, with any command you intend to run via ci (i.e. deploy), you can run:

firebase [command] --token [FIREBASE_TOKEN]