Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

This project is based on assumption the cloud functions and cloud firestore belong to same project #843

Answered by samtstern
mSaurabh asked this question in Q&A
Discussion options

What if I am making a call to a cloud function that is a part of a different project ? How do I authenticate that user ?

Ex:
Project 1 -- all my users are a part of this

Project 2 -- specialized only for cloud functions

How can I initialize the second project using auth.admin?
Can I pass the service account info (project id and service account id) via a fetch call from Project 1
and use it in Project 2 and initialize the Project 1 app and authenticate my users ?
or is callable function better ?

I am happy to add more clarity if my question isn't clear.

You must be logged in to vote

@mSaurabh function triggers cannot span projects.

However you can use firebase-admin across projects, as you said you'll just need to provide service account credentials. If you want you can use Cloud IAM to authorize one single service account to access multiple projects.

Replies: 1 comment

Comment options

@mSaurabh function triggers cannot span projects.

However you can use firebase-admin across projects, as you said you'll just need to provide service account credentials. If you want you can use Cloud IAM to authorize one single service account to access multiple projects.

You must be logged in to vote
0 replies
Answer selected by jhuleatt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /