#How to check a Token's time remaining until expire?

11 messages · Page 1 of 1 (latest)

wary fossil
#

When a Token is created, it's payload also contain "exp" property with the time it will expire.

I need to know if should I create a new token, so - how to check the token's time remaining?
I cannot count on the server time I'm making the check at, right?

Is there some kind of server clock I can get access to?
Thanks

wary fossil
#

hello?

hazy lark
#

The time returned is in ISO8601 format, and so you can compare against server time, taking into account the offset. Most languages will be able to do this pretty trivialy. 🙂

wary fossil
#

@hazy lark Hi,
Please explain:
My Appwrite server is in Germany - So the time the token was created is of Germany time?

#

And I need to calculate the offset - against the user's time?

quick bay
wary fossil
#

@quick bay wow, thanks! I missed that part of the documentationappwritefire

quick bay
hazy lark
#

Hadn't seen that API grouping either. Even knowing its there, I can't find anything pointing towards it... Are there any other "hidden" categories like that?