#itemas-firebase
1 messages · Page 1 of 1 (latest)
is there any way I can get help with that?
I don't know anything about it, but I can try to help, depends a lot on the question
I'm just looking at the source code:
// Update their custom claims
if (role) {
try {
// Get existing claims for the user
const { customClaims } = await admin.auth().getUser(uid);
// Set new role in custom claims as long as the subs status allows
if (['trialing', 'active'].includes(subscription.status)) {
logs.userCustomClaimSet(uid, 'stripeRole', role);
await admin
.auth()
.setCustomUserClaims(uid, { ...customClaims, stripeRole: role });
} else {
logs.userCustomClaimSet(uid, 'stripeRole', 'null');
await admin
.auth()
.setCustomUserClaims(uid, { ...customClaims, stripeRole: null });
}
} catch (error) {
// User has been deleted, simply return.
return;
}
}
Current behaviour is to have stripeRole boolean value when customer is subscribed to the plan
The problem is that I want to have something like patreon.com
and I want to have hundreds of different memberships, so instead I need something like an array that lists currently active plans:
activePlans:['planID1','planID2',etc...]
yeah unfortunately I'm not sure that extension works for your use-case. You'll have to adapt or build your own version in that case
by adapt, do you mean that I could just edit some of the node code and deploy it as a cloud function myself or what do you mean?