auth-wechat-miniprogram
OfficialWeChat Mini Program auth with CloudBase.
AuthorTencentCloudBase
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill enables automatic user identity authentication for WeChat Mini Programs using CloudBase, eliminating manual login steps and making user data available in cloud functions.
Core Features & Use Cases
- Native WeChat Mini Program authentication with CloudBase, with user identity automatically injected into cloud functions.
- Access OPENID, APPID, and UNIONID in cloud functions via wx-server-sdk, enabling user-specific operations and secure authorization.
- Use cases include initializing CloudBase in a Mini Program, extracting user identity in a cloud function, and calling cloud functions from the Mini Program to obtain identity.
Quick Start
- In the Mini Program, initialize CloudBase: wx.cloud.init({ env: 'your-env-id', traceUser: true })
- In cloud functions, initialize the SDK and read the WeChat identity: const cloud = require('wx-server-sdk'); cloud.init({ env: cloud.DYNAMIC_CURRENT_ENV }); const { OPENID, APPID, UNIONID } = cloud.getWXContext()
- Call the cloud function from the Mini Program to retrieve identity: wx.cloud.callFunction({ name: 'yourFunction', success: res => console.log(res.result), fail: err => console.error(err) })
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: auth-wechat-miniprogram Download link: https://github.com/TencentCloudBase/skills/archive/main.zip#auth-wechat-miniprogram Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.