Bindings overview
Workflows
The kinde.mfa
binding lets you perform MFA-related operations.
setEnforcementPolicy(policy: 'required' | 'skip'): void
Allows you to set the MFA enforcement policy for the user for the current auth flow. The policy can be either required
or skip
.
export const workflowSettings = { // ...other settings bindings: {"kinde.mfa": {}}};
The Kinde infrastructure library provides type-safe helper to set the policy:
import {setEnforcementPolicy} from "@kinde/infrastructure";
export default async function (event) { setEnforcementPolicy("required");}
If you’re not using the infrastructure library, you can call the underlying API directly:
kinde.mfa.setEnforcementPolicy("required");