nocobase-app-plugin-verification
БесплатноБез исполняемых скриптовНе проверенConfigure and integrate NocoBase one-time verification codes, verified phone binding, and step-up credentials using server services and React hooks.
от nocobase★ 25 082 звезды на GitHubОб этом скилле
Integrate verification in a NocoBase application
Register the default export from @nocobase/app-plugin-verification/server after Authentication, Notification, and Notification Providers, including their setup dependencies. Install or apply database migrations before serving traffic. The plugin owns userPhones; account identity, sessions, and passwords belong to Authentication and Users. The plugin contributes no pages, no sign-in by SMS and no password reset routes: the application builds those flows on verify(). Installing it does not make a given application capable of any of them, so inspect the registered plugins and the verification configuration first. Verification codes must never travel through ordinary notification.send(), which persists messages; this plugin delivers only the code through sendTransient(). A step-up credential is never sent by SMS: the client exchanges the code for it and receives it in the response body of POST /api/verification/stepUpTokens, then presents it in the X-Verification-Token header of the protected request.
Import the API and hooks from @nocobase/app-plugin-verification/client. Use them inside the host application's Authentication and query providers. The client integration guide shows binding, changing a number, and confirming a sensitive operation. The hooks improve the user experience only: the business server must check permissions and consume its own step-up credential with consumeStepUp, whatever the caller. Notification channel and SMS provider settings stay in the nocobase-app-plugin-notification-providers Skill; ordinary notifications stay in nocobase-app-plugin-notification.
Configure SMS
Set up an SMS notification channel using the Notification Providers Skill; system-sms is the conventional name that its environment mapping fills, not a fixed requirement. The channel each flow uses is the one named by verification.bindPhone.channel for phone binding and verification.stepUp.channel for step-up, and each registered scene names its own channel. Use type: sms, service: aliyun or service: tencent, and a template such as code with a variable mapped from the message's code. Keep provider credentials in private environment mappings. Configure a stable application secrets keyring shared by all instances. Keep the preceding key during rotation until all codes issued under it expire.
Add the verification section to the application's defaultAppConfigs:
import { defineVerificationConfig } from '@nocobase/app-plugin-verification/server';
const verification = defineVerificationConfig({
defaults: {
ttlSeconds: 300,
resendSeconds: 60,
hourlyLimit: 5,
maxAttempts: 5,
},
ipHourlyLimit: 20,
userHourlyLimit: 20,
stepUpTtlSeconds: 300,
bindPhone: { channel: 'system-sms', template: 'code' },
stepUp: { channel: 'system-sms', template: 'code' },
});
Each reserved scene is enabled when its destination is configured. Code expiry and attempt limits are overridable by scene. A scene may increase the common resend interval or decrease the common hourly number limit. The number limits apply across all SMS scenes and server instances. Anonymous requests use an IP quota, while signed-in requests use a separate quota per person. All sender counters use the configured application cache. Use a shared counter backend such as Redis in multi-instance deployments. Anonymous HTTP requests use the authentication plugin's peer-anchored auth.advanced.ipAddress proxy rules. Configure trustedProxies and, if needed, ipAddressHeaders to recognize your ingress. Forwarded addresses from untrusted peers are ignored. Requests with no peer metadata share a fallback bucket.
Register scenes and verify a code
Resolve verificationServiceToken during your server provider's boot and register scenes before use. Choose signedIn for a person proving control of a supplied target and verifiedPhone for a person receiving a code at their existing verified number. Use public for an intentional anonymous flow; provide an eligibility check when sends should be limited to known recipients. Public requests to ineligible targets still count toward limits and return the same response fields as submissions. Providers are contacted synchronously, so response timing may vary.
import { verificationServiceToken } from '@nocobase/app-plugin-verification/server';
const verification = container.resolve(verificationServiceToken);
verification.registerScene('confirmEnrollment', {
method: 'sms',
channel: 'system-sms',
template: 'code',
audience: 'signedIn',
});
await verification.verify({
scene: 'confirmEnrollment',
target: normalizedPhone,
userId: authenticatedUser.id,
code: submittedCode,
});
Clients request codes with POST /api/verification/codes/send, body { scene, phone? }. Supply a canonical E.164 phone for SMS unless the scene targets the user's verified phone.
Установить nocobase-app-plugin-verification в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл nocobase-app-plugin-verification?
Configure and integrate NocoBase one-time verification codes, verified phone binding, and step-up credentials using server services and React hooks.
Как установить скилл nocobase-app-plugin-verification?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл nocobase-app-plugin-verification запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic