1
1

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.

FlutterでFirebaseのアカウントを切り替える

Last updated at Posted at 2023-09-09

FirebaseはGoogleアカウントに紐づいている。
現在使っているFirebaseのGoogleアカウントを変更したい(Firebase CLIのログインアカウントを切り替えたい)というときに、行うべき操作。

1. Firebase CLIのアカウントを切り替え

firebase logout
firebase login

切り替えたいアカウントを選択。

2. Firebase CLIにプロジェクトを追加する

firebase use --add

loginしているアカウントに紐づいているプロジェクトが一覧で表示されるので、Flutterで使いたいプロジェクトを選択。

3. flutterにプロジェクトを紐付ける

flutterfire configure --project=<YourProjectName>

色々と上書きの確認をされるが、すべてyes。

4. Firebaseを初期化

firebase init

必要なFirebaseの機能を初期化する。基本的にはFirestore。エミュレータを使う場合、Emulatorも初期化。

以上。

1
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?