feat: add login link functionality with token generation and validation

This commit is contained in:
Rotimi Best
2026-03-13 05:26:38 +01:00
parent 50252c2327
commit bc6e6e013c
@@ -0,0 +1,16 @@
import { z } from 'zod';
export const ZLoginLinkQuery = z.object({
token: z.string().min(1),
redirect: z.string().optional()
});
export type TLoginLinkQuery = z.infer<typeof ZLoginLinkQuery>;
export const ZLoginLinkPayload = z.object({
sub: z.uuid(),
email: z.email(),
type: z.literal('login-link')
});
export type TLoginLinkPayload = z.infer<typeof ZLoginLinkPayload>;