* Shared authentication utilities for deployed chat endpoints. * Handles token generation, validation, and auth cookies. CORS for these * endpoints lives in proxy.ts as the single source of truth.
(payload: string)
| 12 | */ |
| 13 | |
| 14 | function signPayload(payload: string): string { |
| 15 | return hmacSha256Hex(payload, env.BETTER_AUTH_SECRET) |
| 16 | } |
| 17 | |
| 18 | function passwordSlot(encryptedPassword?: string | null): string { |
| 19 | if (!encryptedPassword) return '' |
no test coverage detected