Need Clarification on Receipt Validation Without a Backend Using RNIap.validateReceiptAndroid() #2825
ayazalphasquad
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I have a concern regarding the receipt validation process for Android in the react-native-iap library. While the common recommendation is to validate receipts on a secure server, our application does not currently have any backend integration not even firebase.
We are looking to perform receipt validation directly on the client side within the React Native app. Specifically, we want to use the RNIap.validateReceiptAndroid() method for Android subscriptions. However, this method requires several parameters:
My concern lies with the accessToken parameter. It appears that obtaining an access token requires authorization through Google Cloud Console, which typically involves server-side operations to securely authenticate and manage tokens.
Questions:
1- How can we obtain and manage the accessToken directly within a React Native app without a backend server?
2- Is there a recommended approach for securely handling Google authorization and token management directly on the client-side in a mobile app?
3- Are there any best practices or alternative methods provided by react-native-iap for validating receipts on Android without a backend server?
I would appreciate any guidance or suggestions on how to effectively handle receipt validation on Android using RNIap.validateReceiptAndroid() in an environment that lacks backend server support or also suggest to handle the receipt validation if we have backend written as well.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions