Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Securely set date that user can't manipulate react-native

Tags:

react-native

Building a simple application which restricts usage based on the date. For example, you can only view a page 3 times per day.

However, if I use the device time, users can change their time and then view these pages again.

Is there another best practice method of doing so? Trying to avoid a call to the server. Using react-native. Thanks

like image 924
tushar747 Avatar asked Oct 08 '18 00:10

tushar747


1 Answers

Best practice is only use server time. you can use following lib

https://github.com/artem-russkikh/react-native-clock-sync

like image 175
Rajesh Nasit Avatar answered Oct 01 '22 01:10

Rajesh Nasit