Hello,
Unfortunately documentation page https://www.revenuecat.com/docs/firebase-integration provides only client-side authorization check
getAuth().currentUser.getIdTokenResult()
.then((idTokenResult) => {
// Confirm the user has a premium entitlement.
if (!!idTokenResult.claims.activeEntitlements.includes("premium")) {
// Show premium UI.
showPremiumUI();
} else {
// Show regular user UI.
showFreeUI();
}
})
.catch((error) => {
console.log(error);
});
It won’t prevent me to write code accessing Firestore with expired subscription.
Can you please provide some examples / design patterns / best practices for server side? For example, Cloud Firestore Rules which check subscription status, or maybe cloud functions? Hard to guess ;)