Skills auth-wechat-miniprogram
๐Ÿ“ฆ

auth-wechat-miniprogram

v2.23.8 Content revision r1 Medium Risk โš™๏ธ External commands๐ŸŒ Network access๐Ÿ“ Filesystem access

Build WeChat Mini Program Auth with CloudBase

WeChat Mini Program auth is easy to misapply when CloudBase identity is automatic. This skill gives practical patterns for wx.cloud, OPENID, UNIONID, and cloud functions.

Supports: Claude Codex Code(CC)
๐Ÿ“Š 71 Adequate

Install with my Agent

Copy this request to your Agent. It includes the canonical Skill page and manifest.

Agent request
Review the Skillstore skill "auth-wechat-miniprogram" from https://skillstore.io/skills/tencentcloudbase-auth-wechat-miniprogram.md and its manifest at https://skillstore.io/api/skills/tencentcloudbase-auth-wechat-miniprogram/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.

Your Agent should still show its plan and request any confirmation required by the security policy.

Test it

Using "auth-wechat-miniprogram". User asks how to identify the caller in a CloudBase cloud function.

Expected outcome:

The assistant explains CloudBase caller context, when UNIONID appears, and how to return only required identity fields.

Using "auth-wechat-miniprogram". User needs Mini Program auth setup for a new CloudBase app.

Expected outcome:

The assistant asks for the environment ID, confirms CloudBase binding, and outlines initialization during app launch.

Using "auth-wechat-miniprogram". User wants to protect user-owned records in a Mini Program.

Expected outcome:

The assistant recommends server-side ownership checks with OPENID and warns against trusting client-supplied owner fields.

Security Audit

Medium Risk
v2 โ€ข 7/9/2026 Open versioned report

Static detections are false positives caused by Markdown inline code, fenced JavaScript examples, reference URLs, and sibling skill paths. The review found two medium-risk content issues: an authorization example that relies on client-supplied owner data and examples that log sensitive identifiers.

1
Files scanned
536
Lines analyzed
0
Review items
0
False positives ignored

Confirmed security concerns (2)

Medium
Client-Supplied Authorization Boundary
The authorization example compares verified OPENID to event.resourceOwnerId. In a Mini Program cloud function, event data is client-supplied, so this can teach unsafe ownership checks if used alone.
The code example directly uses event.resourceOwnerId as the authorization boundary. Legitimate use is possible, but auth guidance should derive ownership from server-side data.
Medium
Sensitive Identifier Logging in Examples
Several examples log OPENID, UNIONID, or auth result objects. These identifiers are sensitive and should be masked or limited to local debugging guidance.
The examples explicitly log user identifiers and auth user objects. The intent appears instructional, but the pattern can expose private identifiers in production logs.
Audited by: codex View Audit History โ†’
Share & cite this report

Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.

Open versioned report
Security Assessment

Copy report link

https://skillstore.io/skills/tencentcloudbase-auth-wechat-miniprogram/audits/2?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_report

Markdown badge

[![Skillstore security assessment](https://skillstore.io/badges/skills/tencentcloudbase-auth-wechat-miniprogram/security.svg)](https://skillstore.io/skills/tencentcloudbase-auth-wechat-miniprogram?utm_source=security_passport_badge)

HTML badge

<a href="https://skillstore.io/skills/tencentcloudbase-auth-wechat-miniprogram?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/tencentcloudbase-auth-wechat-miniprogram/security.svg" alt="Skillstore security assessment" loading="lazy"></a>

Embed card

<iframe src="https://skillstore.io/embed/skills/tencentcloudbase-auth-wechat-miniprogram.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>
Academic citations (APA ยท BibTeX ยท CFF)

APA citation

tencentcloudbase. (2026). auth-wechat-miniprogram security audit report (audit version 2) [Author version 2.23.8]. Skillstore. https://skillstore.io/skills/tencentcloudbase-auth-wechat-miniprogram/audits/2

BibTeX citation

@techreport{tencentcloudbase-tencentcloudbase-auth-wechat-miniprogram-2026, author = {tencentcloudbase}, title = {auth-wechat-miniprogram security audit report (audit version 2)}, institution = {Skillstore}, year = {2026}, number = {2}, url = {https://skillstore.io/skills/tencentcloudbase-auth-wechat-miniprogram/audits/2}, note = {Author version 2.23.8} }

CITATION.cff

cff-version: 1.2.0 message: "If you use this Skill, cite its author and this versioned security audit report." title: "auth-wechat-miniprogram security audit report (audit version 2)" version: "2.23.8" type: report authors: - name: "tencentcloudbase" date-released: "2026-07-09" url: "https://skillstore.io/skills/tencentcloudbase-auth-wechat-miniprogram/audits/2" identifiers: - type: other value: "skillstore:tencentcloudbase-auth-wechat-miniprogram:audit:2" description: "Skillstore immutable audit report identifier"

Skillstore Score

Why this score Evidence Confidence: Medium
55
Architecture
100
Maintainability
87
Content
65
Community
87
Spec Compliance

What You Can Build

Implement Mini Program Identity

Add native CloudBase identity handling to a WeChat Mini Program without building a separate login page.

Review Cloud Function Auth

Check how a cloud function reads OPENID, APPID, and UNIONID before using user-specific data.

Choose Native or Web Auth

Decide whether a feature should use native Mini Program identity or a separate Web authentication flow.

Try These Prompts

Initialize CloudBase Auth
Use this skill to add native WeChat Mini Program auth to my CloudBase app. Ask me for missing env details first.
Read Caller Identity
Create a cloud function pattern that reads OPENID, APPID, and UNIONID with wx-server-sdk. Include error handling guidance.
Design User Data Access
Help me design user-specific database access for a Mini Program. Use OPENID safely and avoid exposing identifiers.
Audit an Existing Auth Flow
Review my Mini Program CloudBase auth flow for native login assumptions, unsafe authorization checks, and production logging risks.

Best Practices

  • Confirm the CloudBase environment ID and Mini Program binding before writing code.
  • Use verified OPENID from CloudBase context for user ownership decisions.
  • Treat logs containing OPENID, UNIONID, or phone auth data as sensitive.

Avoid

  • Do not build a Web-style login page for native Mini Program authentication.
  • Do not send user credentials manually when wx.cloud already passes caller identity.
  • Do not trust client-supplied owner identifiers as the only authorization check.

Frequently Asked Questions

Does this replace WeChat OAuth?
For native Mini Programs, CloudBase uses automatic WeChat identity. Web OAuth is a separate flow and is not covered here.
Can this skill configure CloudBase settings?
No. It guides code patterns after the Mini Program is linked to a CloudBase environment.
Is OPENID always available?
OPENID is available in standard Mini Program cloud function calls when CloudBase is initialized correctly.
When should I use UNIONID?
Use UNIONID when the Mini Program is bound to a WeChat Open Platform account and cross-app identity is needed.
Does it work with Claude Code and Codex?
Yes. The skill is written for Claude, Codex, and Claude Code workflows.
Are the examples production ready?
No. Review authorization logic, logging, error handling, and privacy rules before production use.

Developer Details

License

MIT

Author version

v2.23.8

Skillstore revision

r1

Ref

24b2fe42a456262f3fd0fb3df72e12d9ed2c32ec

Maintenance freshness

7/18/2026

Usage

1 downloads ยท 0 views

File structure

๐Ÿ“„ SKILL.md

More from tencentcloudbase

View all
View all