Warn user on imminent idle session timeout

I am using closeIdleSessions to close the vaadin session after 30m of user inactivity even if there are UI’s open (to override the heartbeat).

How can I warn the user of an imminent session timeout so that they can optionally keep their session alive?