Zod schema guards for validating user profile JSONB data including addresses, MFA verifications, and identity fields in Logto auth system.
// 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.
import { jsonObjectGuard } from '@logto/connector-kit';
import { z } from 'zod';
import { MfaFactor } from './sign-in-experience.js';
export type UserProfile = Partial<{
familyName: string;
givenName: string;
middleName: string;
nickname: string;
preferredUsername: string;
profile: string;
website: string;
gender: string;
birthdate: string;
zoneinfo: string;
locale: string;
address: Partial<{
formatted: string;
streetAddress: string;
locality: strin
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key