auth-wechat-miniprogram
CloudBase WeChat Mini Program native authentication guide. This skill should be used when users need mini program identity handling, OPENID/UNIONID access, or `wx.cloud` auth behavior in projects where login is native and automatic.
Security Assessment
About auth-wechat-miniprogram
The auth-wechat-miniprogram skill provides seamless WeChat Mini Program authentication integration for Tencent CloudBase projects. It eliminates the complexity of traditional OAuth flows by leveraging WeChat's native identity system, where user identification (OPENID/UNIONID) is automatically injected and verified when Mini Programs call CloudBase cloud functions. This skill is essential for developers building identity-aware Mini Program features without implementing manual login flows.
The skill's main capabilities include automatic user identity handling in cloud functions, native wx.cloud authentication behavior, and seamless OPENID/UNIONID access. Unlike web-based authentication that requires explicit login pages and token exchanges, Mini Program authentication with CloudBase is transparent to developers—the platform handles all verification automatically. The skill provides guidance on accessing user identity in cloud functions, understanding the automatic authentication flow, and building identity-aware Mini Program features.
This skill is designed for developers building WeChat Mini Programs with CloudBase who need user identification without complex authentication logic. Common use cases include personalized Mini Program experiences, user-specific data operations in cloud functions, and integrating user identity with CloudBase services. It is specifically targeted at Mini Program scenarios where login is native and automatic, not for web-based WeChat login or server-side Node.js authentication flows.
FAQ
Do I need to implement a login page for WeChat Mini Program authentication?
No. WeChat Mini Program authentication with CloudBase is automatic and seamless. When a Mini Program calls a cloud function, the user's openid is automatically injected and verified by WeChat without requiring explicit login flows or UI.
What's the difference between this skill and web-based WeChat authentication?
This skill handles native Mini Program authentication where identity is automatically provided. Web-based WeChat authentication requires OAuth flows, login pages, and token exchanges. Use this skill for wx.cloud Mini Programs, and the auth-web skill for web applications.
How do I access user identity in my cloud functions?
User identity (openid, unionid) is automatically injected into cloud functions when called from a Mini Program. CloudBase handles verification, so you can directly access the user's identification without manual authentication checks.
What are the requirements to use this authentication method?
You need a CloudBase environment ID and a WeChat Mini Program linked to that CloudBase environment. The Mini Program must be properly configured to use wx.cloud services.
Can I use this skill for server-side Node.js authentication?
No. This skill is specifically for WeChat Mini Program native authentication. For server-side auth with Node SDK or non-Mini Program scenarios, use the appropriate auth skills like auth-nodejs or auth-web.
Install auth-wechat-miniprogram
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
tencentcloudbase/skills