To prevent unauthorized in-app purchases, you can change the restriction option from your device.
For iOS:
1. Go to Settings then tap General > Restrictions.
2. You will be prompted to enter your Restrictions Passcode.
3. Scroll-down to In-App Purchases and turn this off by tapping the switch left.
For Android:
1. Go to Google Play then tap Menu
2. Scroll down and tap Settings
3. Scroll down to User Controls then tap 'Require authentication for purchases'
4. Choose Require Authentication 'For all purchases through Google Play on this device'