What problem does it solve?
This Skill solves the problem of implementing correct, secure WeChat Mini Program user authentication and retrieving a verified user identity inside CloudBase cloud functions without building complex OAuth flows.
Core Features & Use Cases
- Mini Program native authentication: Uses CloudBase’s integration so user identity is automatically provided when the Mini Program calls a cloud function.
- Verified user identity in cloud functions: Retrieves OPENID, APPID, and optionally UNIONID via cloud.getWXContext().
- Cloud function initialization guidance: Recommends using cloud.DYNAMIC_CURRENT_ENV to reliably bind functions to the correct CloudBase environment.
- Common use cases: Associate user data by OPENID in your database, implement access control, and optionally support cross-app identification with UNIONID when available.
Quick Start
Use the auth-wechat-miniprogram skill to configure your Mini Program to initialize CloudBase and then call a cloud function that returns the verified OPENID, APPID, and UNIONID (when available).