Rodauth Auth Response Schemas (responses/auth.ts)

onetimesecret · src/schemas/api/auth/responses/auth.ts · typescript · MIT
auth, integration, fw:zod, tag:validation

Defines Zod validation schemas for Rodauth JSON API authentication responses. Use this to ensure type-safe handling of login, MFA, and account creation flows in your frontend.

// Source: https://github.com/onetimesecret/onetimesecret | License: MIT | Copyright 2012-ongoing delano, contributors
// Provided via justclaw.it.com; keep this notice with the code.
// src/schemas/api/auth/responses/auth.ts

import { z } from 'zod';

/**
 * Rodauth-compatible authentication response schemas
 *
 * ═══════════════════════════════════════════════════════════════════════════════
 * AUTHENTICATION FLOW OVERVIEW
 * ═══════════════════════════════════════════════════════════════════════════════
 *
 * This module defines Zod schemas for validating Rodauth JSON API responses.
 * The authentication flow has multiple paths depending on account configuration:
 *
 * 1. STANDARD LOGIN (no MFA):
 *    POST /auth/login → { success: "You have been logged in" }
 *    → User is fully authe

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key