Reputation: 47
I'm trying to initialize firebase functions for an iPhone app.
I have two separate accounts that I have different firebase projects on.
I ran firebase init, but I get an error
Error: Unable to authorize access to project[PROJECT ID]
where the project ID is a project id for a project in the account im not using.
I used
Firebase use --add
and it worked perfectly.
I ran
Firebase list
and the project I want to init is listed there. But when I ran the init again I got the same error with the wrong project ID still.
ps. the other project ID doesn't come up in Firebase list
EDIT: I logged out of the different account and am logged into the correct account.
Upvotes: 1
Views: 598
Reputation: 51
You should check the alias. Aren't you just setting your project for staging? After Firebase use --add, you should do like
What alias do you want to use for this project? (e.g. staging) default
and also
What alias do you want to use for this project? (e.g. staging) dev
In other words, you have to switch all the alias to the project you re trying to use.
This worked for me!
Upvotes: 1
Reputation: 317808
If you're switching between two Google accounts, you have to firebase logout
from one and firebase login
to the other before you can access the projects in those different accounts.
Upvotes: 0