const VERIFY_URL = 'https://verifysession-edvvp3hbnq-du.a.run.app';

export type VerifiedSession = {
  uid: string;
  email: string;
  role: number;
};
export async function verifySession(): Promise<VerifiedSession> {
  return await $fetch<VerifiedSession>(VERIFY_URL, {
    method: 'GET',
    credentials: 'include', // ensures session cookie is sent
  });
}
