verificationIdentifierGuard (types/interactions.ts)

logto · packages/schemas/src/types/interactions.ts · typescript · MPL-2.0
auth, Auth / Identity

Zod schema for verification identifiers in Logto authentication flows.

// Source: https://github.com/logto-io/logto | License: MPL-2.0 | Copyright under Patent Claims infringed by Covered Software in the absence of | Modified files must remain under MPL-2.0
// Modifications to this file must remain under MPL-2.0.
// Provided via justclaw.it.com; keep this notice with the code.
/* eslint-disable max-lines */
import { emailRegEx, numberAndAlphabetRegEx, phoneRegEx, usernameRegEx } from '@logto/core-kit';
import { z } from 'zod';

import {
  AdditionalIdentifier,
  MfaFactor,
  SignInIdentifier,
  jsonObjectGuard,
  webAuthnTransportGuard,
} from '../foundations/index.js';
import { type ToZodObject } from '../utils/zod.js';

import {
  requestedAuthenticationContextGuard,
  type RequestedAuthenticationContext,
} from './authentication-context.js';
import { Inter

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

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

Get a free API key