Skip to content
  • Workflows
  • Bindings

kinde.mfa

The kinde.mfa binding lets you perform MFA-related operations.

setEnforcementPolicy(policy: 'required' | 'skip'): void

Link to this section

Allows you to set the MFA enforcement policy for the user for the current auth flow. The policy can be either required or skip.

Available in workflows

Link to this section
export const workflowSettings = {
// ...other settings
bindings: {"kinde.mfa": {}}
};
Link to this section

The Kinde infrastructure library provides type-safe helper to set the policy:

import {setEnforcementPolicy} from "@kinde/infrastructure";
export default async function (event) {
setEnforcementPolicy("required");
}

Using the low-level API

Link to this section

If you’re not using the infrastructure library, you can call the underlying API directly:

kinde.mfa.setEnforcementPolicy("required");