auth-helpers
auth-helpers copied to clipboard
Svelte: Add a way to customize the conditions of `handleVisibilityChange()`
As the title suggest, I'd like to be able to override the handleVisibilityChange
function to be able to only check the session on page load and not on page visibility change. I would welcome such a change since not all applications need the user to be logged in at all times, especially on SSR pages.
I suggest: Export the handleVisibilityChange
function similar to the onUserUpdate
function, give it a default function (the current one is fine) and voilà.