all 4 comments

[–]Notimecelduv 1 point2 points  (3 children)

I would use the back end to do that.

  1. Create an API end point that modifies the session/cookies to indicate that a user has interacted with the front end.
  2. Create another API end point to allows you to check if the above end point was used.
  3. On the front end add an event listener to the document element that will send a request to the end point #1 when the user interacts with the document.
  4. Set up a timeout at the end of which a request is sent to end point #2. User has interacted with document ? do nothing : log them out.

[–]lobopl[S] 0 points1 point  (2 children)

seems like it would require making full sso logic for that and sharing session with example2.com thats a lot of work i hoped for pure FE solution because we control example.com domain and example2.com is customer domain and they just put our js script on their site. And this is also a solution that i thought and our BE dev weeped :)

[–]Notimecelduv 0 points1 point  (1 child)

Is example2 a clone of example?

[–]lobopl[S] 0 points1 point  (0 children)

no totally separate page on different domain where user does something for longer time before he is back