I'm trying to login to Firebase using login credentials of, let's say, User-Alice.
But when I go through the authorization procedure I get a message saying I'm logged in as User-Bob. This is not mentioned anywhere in the documentation nor does it explain how to change the user I'm logged in as.
How can I change the Firebase logged in user from User-Bob to User-Alice?
Thank you.
To download and run the binary for the Firebase CLI, follow these steps: Download the Firebase CLI binary for Windows. Access the binary to open a shell where you can run the firebase command. Continue to log in and test the CLI.
The Firebase CLI is a utility used to administer Firebase projects and perform tasks such as Realtime Database management tasks from the command-line of a terminal or command-prompt window. The Firebase CLI is also the method by which Firebase Cloud Functions are deployed and managed.
To send a password reset email to user, on the Users page, hover over the user and click ... > Reset password. The user will receive an email with instructions on how to reset their password. You can customize the email from the Email Templates page.
Manage multiple users via the CLI
You can manage multiple users without re-authenticating, as of version 9.9.0 of the Firebase CLI.
firebase login:add
firebase login:list
firebase login:use
Example:
firebase login:add [email protected]
firebase login:add [email protected]
firebase login:add [email protected]
firebase login:use [email protected]
firebase login:list
firebase deploy --only hosting # deploy as [email protected]
Get a URL printed to the terminal.
firebase login --reauth
Use that link in the browser with the needed profile.
Still working, less convenient older answer
The easiest way to handle this is to logout User-Alice and the login User-Bob.
firebase logout
firebase login
But, if you're logged as User-Alice with a Google account in the browser you'll need to sign out there first.
use this
firebase login --reauth
then you can change account
In the recent release of Firebase CLI (9.9.0) there was support for multiple accounts via new commands:
Reference: https://github.com/firebase/firebase-tools/tree/v9.9.0
So I used firebase login:add to add a new account and then switched to newly added account use firebase login:use
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With