I want to ask about Firebase Admin SDK in case for using Custom Claim between two related apps: Server App and Client App. Each of them has different features. They are all placed inside the same Firebase project, but using different collection. Both apps are using Cloud Function which have different file of Node.js. I put all the Cloud Function codes in different project of Visual Studio Code.
For example in this code for Server App:
claims = {
serverFeatureA: true,
serverFeatureB: false,
};
admin.auth().setCustomUserClaims(uid, claims);
And this is for Client App:
claims = {
clientFeatureA: true,
clientFeatureB: false,
};
admin.auth().setCustomUserClaims(uid, claims);
What I am worrying is if the same Gmail account uses these both apps and Cloud Function assigns its claims for different features? Will this overwrite the old claims written in Client App and only exist in Server App if user subscribed to Client first, then Server? Any help will be great. Thanks.