Multiple "firebase login" per client account
See original GitHub issueApologies if this was already raised. It would be nice for firebase login
to not have to be client account wide (i.e. ~/.config/configstore/firebase-tools.json
). I use an OSX machine, and deploy to multiple firebase accounts. Switching users on OSX is a PITA (and disrupts communication apps). Logging in and out of firebase is also not ideal. Ideally, the config would be stored in the project root (and I’d just .gitignore
it).
Let me know where to look at a high level and I’ll submit a PR. Or perhaps this already exists and I’m just using it wrong.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:57
- Comments:16 (1 by maintainers)
Top Results From Across the Web
Link Multiple Auth Providers to an Account Using JavaScript
You can allow users to sign in to your app using multiple authentication providers by linking auth provider credentials to an existing user...
Read more >Firebase Multiple Accounts are signed at the same time
You'll be able to sign in with two users in this way if there are two projects to sign in with. You'll have...
Read more >One Firebase, multiple company clients - Google Groups
Each 'client' is actually a unique company, unrelated to other clients (companies), and do not share data nor users. Authentication cannot rely on...
Read more >Allow multiple accounts with the same email address
firebase.auth().linkWithRedirect(). When you allow only one account per email address, these functions retrieve user profile information from the identity ...
Read more >Linking multiple providers to an account | Identity Platform ...
Create multiple accounts for each identity provider: A new Identity Platform user account ... Sign in the user with any authentication provider or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi all, I created a small cli helper that leverages login:ci to allow using multiple accounts on one machine. If you want, you’re welcome to use it, and I’d love for some feedback and ideas 😃 It’s called firebase-multi and it’s pretty easy to use:
yarn add -g firebase-multi
ornpm i -g firebase-multi
firebase login:ci
and complete login flow until you get the firebase ci token in your terminal.firebase-multi set <your-project> <firebase-ci-token>
firebase-multi use <your-project> firebase deploy
(or any other firebase command that requires authentication)All tokens are saved in ~/.config/configstore/firebase-multi.json
So I found a work-around on Linux (Ubuntu).
When you login (but before you log out), your auth tokens are stored in
~/.config/configstore/firebase-tools.json
.For each company:
firebase-tools-[companyName].json
Then I added the following aliases to my profile:
Not as elegant as I was hoping, but easier than learning the internals of the tool, proposing a PR, etc. Enjoy!
Tip: If you need to know which account you are currently using, just run
firebase login
. If your auth is valid, it’ll spit out the email address.