Page 1 of 1

.com API: How long should a user's log-in token be kept?

Posted: Tue Nov 28, 2023 2:12 am
by bleaklodge
In other words, every how often should I destroy the token (logout) and generate a new one via login?

Re: .com API: How long should a user's log-in token be kept?

Posted: Tue Nov 28, 2023 5:39 pm
by os_dev
In other words, every how often should I destroy the token (logout) and generate a new one via login?
up to you... destroying the tokens is not needed, you can just leave them expire.

Re: .com API: How long should a user's log-in token be kept?

Posted: Tue Nov 28, 2023 6:11 pm
by bleaklodge
That's my question, how long do they last? I want to know so that I cache the token for x amount of time and renew when needed, to avoid unnecessary login calls to the API.

Re: .com API: How long should a user's log-in token be kept?

Posted: Tue Nov 28, 2023 6:57 pm
by oss
JWT is returned, you can check its validity via jwt.io

JWT is valid for 24 hours.

I updated docs as well

https://opensubtitles.stoplight.io/docs ... cc0a-login

Re: .com API: How long should a user's log-in token be kept?

Posted: Tue Nov 28, 2023 7:06 pm
by bleaklodge
Thanks!