I'm trying to monitor the validity of subscriptions based on data in Firestore using Firebase Extension. The monitoring process is intended to be integrated into a Flutter app.
The documentation lists the following methods for verifying entitlement access: https://www.revenuecat.com/docs/firebase-integration#using-the-extension
- Use the RevenueCat SDK
- Use custom claims in Firebase Authentication
- Retrieve the expires_date from the REVENUECAT_CUSTOMERS_COLLECTION document and compare it to the current date and time.
However, for the following reasons, I would like to avoid using the above methods:
- With only the RevenueCat SDK, it is not possible to verify whether a user with the same user ID has entitlements on another device.
- If using custom claims in Firebase Authentication, the data cannot be obtained through a stream (real-time monitoring is not possible).
- While expires_date needs to be compared to the current date and time, on mobile apps, the current time can be changed by modifying the device time.
Is it possible to determine whether a subscription is valid only based on Firestore data without using the methods listed above?
If not possible, how can I resolve the above issues?
Thank you for your response.