auth-events.ts 233 B

1234567891011
  1. export const AUTH_EXPIRED_EVENT = "app:auth-expired";
  2. export function emitAuthExpired() {
  3. if (typeof window === "undefined") {
  4. return;
  5. }
  6. window.dispatchEvent(
  7. new CustomEvent(AUTH_EXPIRED_EVENT)
  8. );
  9. }