1

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.

1

3 Answers 3

1

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!

Sign up to request clarification or add additional context in comments.

Comments

0

Firebase login to the account that has the project.

1 Comment

I'm in the account that has the project
0

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.

1 Comment

Yes, I did that

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.