Multiple firebase projects and App auth check flow

37 views
Skip to first unread message

Rajesh Bhardwaj

unread,
Jan 10, 2022, 1:56:53 PM1/10/22
to Firebase Google Group
Hello,
I want to use multiple firebase project. My scenario is I first sign in , based on user data (which is present in my default firebase app).

As I need to have same UID across all projects, I understand I need to get custom token.
And so I call the backend, provide the project name and it returns me the customtoken,
and then I do --
FirebaseApp app = FirebaseApp.getInstance("secondary"); FirebaseAuth.getInstance(app).signInWithCustomToken(token);

From what I read in documentation , I dont have to do it everytime , so as part of my startup, shall I have a check for all project that whether they are signed in , if not signed in , it means the custom token is never called for them and I call the backend service again.


Reply all
Reply to author
Forward
0 new messages