UNPKG

@nocobase/plugin-verification

Version:

User identity verification management, including SMS, TOTP authenticator, with extensibility.

46 lines (45 loc) 1.8 kB
/** * This file is part of the NocoBase (R) project. * Copyright (c) 2020-2024 NocoBase Co., Ltd. * Authors: NocoBase Team. * * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. * For more information, please refer to: https://www.nocobase.com/agreement. */ import React from 'react'; export interface VerifierSelectProps { /** * Verification scene name passed to `verifiers:listByScene`. Each * consumer plugin uses its own scene (e.g. `auth-sms`, `two-factor`, * `unbind-verifier`) so different scenes can opt different verifier * types in or out via server config. */ scene: string; value?: string | string[]; onChange?: (next: string | string[]) => void; /** Default false. */ multiple?: boolean; placeholder?: string; disabled?: boolean; /** * antd `Select` style passthrough. Keep this open in case a caller * needs to size the dropdown explicitly inside a constrained form. */ style?: React.CSSProperties; /** * Suppress the helper text rendered under the Select. Defaults to * `false`; pass `true` when the caller wants to host its own hint * (e.g. inside a `Form.Item.extra` slot). */ hideHint?: boolean; } /** * Domain wrapper around the framework-level `RemoteSelect`. Loads the * verifiers configured for `scene` from `/verifiers:listByScene` and * binds them to a single- or multi-select. The helper text underneath * mirrors the v1 affordance: a list of available verifier types and a * deep link into the admin settings page. The list of available types * comes from the same response, so no extra request is needed. */ export declare function VerifierSelect(props: VerifierSelectProps): React.JSX.Element; export default VerifierSelect;