Oct 27, 2023
As SSR is not supposed to capture user events in the server but render a "usable/viewable" SPA, an approach could be initializing the service only if the app is currently loaded on a browser using Angular's isPlatformBrowser.
Looking at the user idle library it doesn't use any Injection tokens for document or window, so it won't work out of the box.