Make session token timeout after 2 hours

I have a API workflow to log the user in and give a session token to that user to perform different actions. Is it possible to make the token timeout after 2 hours so the user has to login again to continue their works?

add expiration then log out the user if it’s expired

It’s not possible to change the expiration time of the token

I’m curious, as soon as they login, have you tried scheduling a backend workflow for 2 hours in the future then do the Log out action? (test with shorter time of course)

2 Likes

Sorry but I’n new to bubble so I’m not sure, how can I schedule a backend workflow for every 2 hour?
There are hundreds of users and each of them have different login time

When user clicks the login button schedule a backend workflow in the future (2 hours upon clicking login), inside the backend workflow add an action to logout the user.

1 Like