1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Firebase CLI と GOOGLE_APPLICATION_CREDENTIALS

Posted at

Firebase / quickstart-js の試し方 - Qiitafirebase login:ci を使うと deprecated 警告が出たので、代わりに使える GOOGLE_APPLICATION_CREDENTIALS についてメモする。

GOOGLE_APPLICATION_CREDENTIALS というのは Firebase Function を使ってサーバー側で Firebase を操作する Firebase Admin SDK で使う認可方法だ。まず

Firebase コンソールの歯車アイコン > プロジェクトの設定 > サービスアカウント > 新しい秘密鍵の生成

で秘密鍵をダウンロードする。このファイルを /path/to/service-account-file.json のような場所に置いて

export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-file.json

とすると firebase login なしで Firebase CLI 各種コマンドを使える。firebase login:ci と違って警告も出ないし CI に使える。

参考

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?