import type { AuthResponse } from "@/features/auth/auth.types";

const storageKey = "puresaas-auth";

export function storeAuthSession(response: AuthResponse) {
  if (typeof window === "undefined" || !response.token) return;
  window.sessionStorage.setItem(
    storageKey,
    JSON.stringify({ token: response.token, user: response.user }),
  );
}
