I have a RestAPI which when hit authenticate the user. This api is exposed to android and ios developers they hit this api to allow user to login to our app
My requireme
php example
When user success login
$t1 = time(); $t2 = $t1 +10 Save $t1 in redis server Save $t2 in browser cookie (encrypted, only server know how to decrypt it)
Whenever browser visit server always compare that $t2 > $t1, if not send browser message "you are logout"