Skip to content

Mini-Programs

@captcha-pro/mp-shared powers WeChat, uni-app, and Taro. Mini-programs run in backend-only mode — they request captcha images from your backend and verify server-side, since client-side image generation is not available.

Install

bash
# WeChat / uni-app / Taro
pnpm add @captcha-pro/weixin

Supported Frameworks

FrameworkPackage variantNotes
WeChat Mini-Program@captcha-pro/weixinWXML/WXSS/JS
uni-app + Vue 3@captcha-pro/uniapp-vueVue cross-platform
uni-app + Vue 2@captcha-pro/uniapp-vue2Vue cross-platform
Taro + React@captcha-pro/taro-reactReact cross-platform
Taro + Vue 3@captcha-pro/taro-vueVue cross-platform
Taro + Vue 2@captcha-pro/taro-vue2Vue cross-platform

Usage

Mini-program components always use verifyMode: 'backend' and point backendVerify at your server:

javascript
import { SliderCaptcha } from '@captcha-pro/weixin'

// configure with backendVerify pointing to your server

See the Backend section for reference server implementations that provide the /api/captcha and /api/captcha/verify endpoints these components expect.

Released under the MIT License.