feat: Initial login / logout API endpoints

This commit is contained in:
2026-03-26 13:51:37 -04:00
parent 9bb6b40191
commit bd108f69a4
10 changed files with 322 additions and 19 deletions

View File

@@ -0,0 +1,18 @@
declare module "#auth-utils" {
interface User {
id: string;
email: string;
roles: string[];
}
interface UserSession {
loggedInAt: string;
}
interface SecureSessionData {
authToken: string;
refreshToken: string;
}
}
export {};

View File

@@ -0,0 +1,7 @@
import * as z from "zod";
export const authLoginFormSchema = z.object({
username: z.email("Courriel invalide"),
password: z.string("Veuillez saisir votre mot de passe"),
});
export type AuthLoginForm = z.infer<typeof authLoginFormSchema>;