Validates new email identifiers against blocklist policy to prevent sign-in with blocked emails.
// 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 { SignInIdentifier, type VerificationCodeIdentifier } from '@logto/schemas';
import { validateEmailAgainstBlocklistPolicy } from '#src/libraries/sign-in-experience/email-blocklist-policy.js';
import type Queries from '#src/tenants/Queries.js';
export const guardNewIdentifierEmailBlocklist = async (
queries: Queries,
identifier: VerificationCodeIdentifier,
isNewIdentifier: boolean
) => {
if (!isNewIdentifier || identifier.type !== SignInIdentifier.Email) {
return;
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key