How do I securely save data without user accounts?

0 favourites
  • 7 posts
From the Asset Store
In this template the music plays without looping in your game
  • Hi,

    Maybe someone will have an idea on how to accomplish this.

    I made an app which has certain coupons. The coupons can be spent within the app and then purchased again. My app can check whether a product is bought. This is called 'managed products.'

    I would like the coupons to be 'purchased' initially and needed to be repurchased only after

    being spent. In other words I would like to give every new user 5 coupons for free. Unfortunately, you can't set IAPs to be 'purchased' by default in the Android's developer console.

    So, the only way to do this seems to be to keep track of the coupons within my app and add/spend them as needed.

    BUT... this seems insecure. Someone could hack into the webstorage and give themselves more coupons etc. Also the coupons would reset to full after reinstalling the app. So I need a secure way to save the info about the amount of coupons externally on a server. I'd much rather not implement a user account system just for this purpose.

    The best thing would be to be able to save the information in a Google Play service or something. Is it possible? Alternatively I could identify the user by a device ID but I'm not sure if it is possible to get a unique ID on Android with Construct 2. Bottom line, I need a persistent, verifiable and secure way to store one number for every installation of my app.

    Any thoughts on this?

    [Edit] This would be perfect. Unfortunately it's currently in some kind of private beta. https://developer.android.com/google/gcs/index.html

  • https://www.scirra.com/manual/173/iap

    make the first 5 coupons as a own product ID and check with "Has product" if it was bought or not

  • That is exactly what I'm doing now. The problem: the coupons need to be available for every new user for free after the first install.

    As far as I know products in Google Play are always set as 'not purchased' until the user buys them. So every new user has 0 coupons until they buy some. I would like every user to start out with 5 coupons and need to repurchase after they spend them.

  • make the first 5 coupons as a own product ID to buy for 0.00$

    and if that was made they can no longer buy this product for 0.00$

    the other coupons they can then buy are regualar prices

  • Actually that's a great idea. But I've just checked - you can't set IAP prices below $1 so it won't work.

  • The only thing that i got in my mind are just check to check for everything.

    Like if he has a score more than 0 or objects in his bags and all that stuff and if one of this becomes true than they will never get coupons for free.

    And for reinstallers just check the store if they have purchased something and if its true than they will get none too. And if you have a facebook login then check this for a score too. If your game dont need scores and you have a login function for fb, then set the fb score to 1 and check for that too.

    Even for checking if there is any webstorage key existing would be enough, if there is only 1 key existing than they dont get any coupon too.

    If you thinking of saveing information on a server than just generate UserID's for each new player and let them at first choose a name for there charakters or something and save that information too. Now no one would be able to change his userID in webstorage because they dont know the correct username that belongs to it.

    For reinstallers are no chances to check for something that i know would work. Maybe someone others has a better idea. Sorry thats all i can help.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you. I thought so... Who would have thought that such a thing would be so cumbersome. It would be way easier if there were such things as free IAPs or a way to have the product purchased by default. Unfortunately, preventing reinstallation-cheating is crucial so I can't just skip it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)