mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-18 14:13:06 +00:00
Introduce the internal campaign-management area gated by its own authentication, kept isolated from the Payload admin so a campaign session and an admin session can coexist in one browser. - Add separate `campaignUser` auth collection (not `users` + roles) - Authenticate via an isolated httpOnly `campaign-token` cookie scoped to /campanha, distinct from the default `payload-token` - Add loginCampaign/logoutCampaign server actions and getCampaignUser session verification helper - Add public login route and a protected (app) route group whose layout enforces the auth barrier - Add migration 20260716_010420_add_campaign_user and document the auth foundation in AGENTS.md
8 lines
231 B
TypeScript
8 lines
231 B
TypeScript
import { z } from 'zod'
|
|
|
|
export const campaignLoginSchema = z.object({
|
|
email: z.email('Email inválido'),
|
|
password: z.string().min(1, 'Informe a senha'),
|
|
})
|
|
|
|
export type CampaignLoginInput = z.infer<typeof campaignLoginSchema>
|