Here is a blank aia with a refresh button, so that the user can keep the session alive, as long as their existing session has not passed the hour.
You could add a clock to monitor the signin time and either automatically refresh, or alert the user that they need to do so to remain signed in, and to prevent them from signing in on another device
You will need to work out your own logic handling for such scenarios.
My blocks assume that the user will need to make a signin attempt first, before doing anything else, not an uncontrolled signout. If they can't signin, then they can't signout...
The error is that you are comparing milliseconds (a big number) against the JSON responseContent.
You did not try to extract the part that holds the time value you want, you just shoved the entire responseContent down the mouth of the poor little math compare (<) block, which was just expecting a couple of numbers.
The left side has a time in milliseconds.
The right side has a big long piece of JSON text.
Worse, none of the values in that JSON have enough digits to be a milliseconds value.
So your problem is,
What are you trying to compare against the circled milliseconds value, and why are you doing that comparison?
I need that:
1 (a single user authenticates on a single device)
and if you try to log in on another device with the same email and password the message will be (You have already logged in on another device)
2 (if the power goes out or the phone turns off and the app closes without logging out while it is active)
When I restart, it updates the token and allows me to log back in only on this device since I save the UID, URL and token in the mobile's TinyDB.
From what I understand, the token changes every hour, which is why they modified the date in milliseconds.
and the power outage sometimes lasts more than an hour, that's why if I keep the start token it won't do the same thing again after more than an hour and I won't be able to log in again.