Hoping someone has some insight…
I’ve set up a “log in” API endpoint for one of my apps. I’m passing the username and password via POST as you might expect. And as a result, I get the expected User ID, token and expires values in a JSON message.
I have two questions:
-
It is possible to change the default value of “expires”? It appears to be 365 days, which is an awfully long time in my context. I was looking for something more like 1-2 weeks. Is this possible?
-
I also noticed that if I log the same user in via the API multiple times, all of the issued tokens remain valid. I understand why (because the previous tokens haven’t expired) but I was wondering if there was any mechanism to revoke previously issued tokens, or simply make the most recently issued token the only one that’s valid.
All suggestions and comments welcome.
-Nick