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.
4k tokens
context cost
the whole folder, loaded on every use
2
files
instructions only
0
copies elsewhere
how many repositories repackaged it
1066
stars on the repo
on the repository, not the skill itself
Install
one command, takes just this skill from the repository
If this environment only installed the current skill, start from the CloudBase main entry and use the published cloudbase/references/... paths for sibling skills.
CloudBase main entry: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/SKILL.md
Current skill raw source: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/auth-wechat-miniprogram/SKILL.md
Keep local references/... paths for files that ship with the current skill directory. When this file points to a sibling skill such as auth-tool-cloudbase or web-development, use the standalone fallback URL shown next to that reference.
Activation Contract
Use this first when
The task is about WeChat Mini Program auth behavior, wx.cloud identity, OPENID / UNIONID, or how a mini program caller is identified in CloudBase.
The project is a CloudBase mini program and the auth question is about native mini program identity rather than provider configuration.
Read before writing code if
The request mentions mini program login, user identity in cloud functions, or wx.cloud auth assumptions.
The user expects a Web-style login page or explicit token exchange in a mini program; route them back to native mini program auth behavior.
Then also read
Mini program project implementation -> ../miniprogram-development/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/miniprogram-development/SKILL.md)
Cloud function implementation -> ../cloud-functions/SKILL.md (standalone fallback: https://cnb.cool/tencent/cloud/cloudbase/cloudbase-skills/-/git/raw/main/skills/cloudbase/references/cloud-functions/SKILL.md)
Do NOT use for
Web-based WeChat login or Web auth UI.
Provider enable/disable or auth console setup.
Generic Node-side auth flows outside mini program identity handling.
Common mistakes / gotchas
Generating a Web-style login page for a wx.cloud mini program.
Treating mini program auth as a provider-configuration problem.
Forgetting that caller identity is injected in cloud functions automatically.
When to use this skill
Use this skill for WeChat Mini Program (小程序) authentication in a CloudBase project.
Use it when you need to:
Implement identity-aware WeChat Mini Program flows with CloudBase
Access user identity (openid, unionid) in cloud functions
Understand how WeChat authentication integrates with CloudBase
Build Mini Program features that require user identification
Key advantage: WeChat Mini Program authentication with CloudBase is seamless and automatic - no complex OAuth flows needed. When a Mini Program calls a cloud function, the user's openid is automatically injected and verified by WeChat.
Do NOT use for:
Web-based WeChat login (use the auth-web skill)
Server-side auth with Node SDK (use the auth-nodejs skill)