Hello Community!
So we use B2C with a JWT token which we use to authenticate to backend so after 1 hour the token expires and the actions will not work and give unauthorized error. So I’m looking into a forced logout option so after 45-60 minutes the user needs to log in again will the following setting be the option I would need to implement?
Hi Haider
I suppose you could use a timer in combination with the log out action node to log out the user after a certain amount of time.
Regards,
Johan
Hello Johan!
Could you provide with an example?
Probably a very dumb question
! I was looking at other solutions and saw the code solution.
I’m guessing that the problem lays in the calling of the actions, but not sure, tried different methods and can’t seem to get it to work. Could there be a setting i need to enable or does this might be outdated method?
Hi
On app load set an app variable - “Logged in” Datetime
create a timer that fires an action every hour (inteval 3600 sec)
in the action
calculate time difference from logged in to now
if difference > X hour (your limit)
Probably there are other ways to do this as well..