0
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 3 years have passed since last update.

Firebaseへログインできなかった

Last updated at Posted at 2020-09-10

はじめに

Firebaseの環境を構築しようとした際、Firebaseのログイン処理を実行しようとしたがうまくいかなかった。

実行したこと

コンソールで firebase login を実行
$ firebase login
i  Firebase optionally collects CLI usage and error reporting information to help improve our products. Data is collected in accordance with Google's privacy policy (https://policies.google.com/privacy) and is not used to identify you.

? Allow Firebase to collect CLI usage and error reporting information? Yes
i  To change your data collection preference at any time, run `firebase logout` and log in again.

Visit this URL on this device to log in:
https://accounts.google.com/o/oauth2/・・・・・・

Waiting for authentication...

リンクからGoogleアカウント認証ページにアクセスして認証を行う

しかしブラウザ上の認証ページで認証を実行できなかった。

解決策

・CLI環境でFirebaseへログインする方法 https://qiita.com/RCA3610/items/adb16aa21826377f3c0f

上記の記事が非常に参考になりました。

先ほどのコードに --no-localhost オプションを追加する。

firebase login --no-localhost
i  Firebase optionally collects CLI usage and error reporting information to help improve our products. Data is collected in accordance with Google's privacy policy (https://policies.google.com/privacy) and is not used to identify you.

? Allow Firebase to collect CLI usage and error reporting information? Yes
i  To change your data collection preference at any time, run `firebase logout` and log in again.

Visit this URL on any device to log in:

https://accounts.google.com/o/oauth2/auth.......

? Paste authorization code here: (ここにパスコードをペースト)

実行後URLからGoogleアカウント認証ページで認証を実行するとパスコードが発行されるのでコンソールにペースト

 Success! Logged in as ....

これでFirebaseのログイン処理が完了!!

0
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
0
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?