auth-nodejs-cloudbase

Retrieve caller identity, query end-user profiles, and issue custom login tickets via CloudBase Node.js.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/mrpersimmon/xiao-han-studio --skill auth-nodejs-cloudbase-mrpersimmon
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: auth-nodejs-cloudbase
Source: https://github.com/mrpersimmon/xiao-han-studio/tree/main/.agents/skills/cloudbase/references/auth-nodejs
Command: npx skills add https://github.com/mrpersimmon/xiao-han-studio --skill auth-nodejs-cloudbase-mrpersimmon

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It helps you correctly implement CloudBase server-side authentication in Node.js so your backend can reliably determine caller identity, look up end users, and issue custom login tickets.

Core Features & Use Cases

  • Caller identity access: Read the current caller’s identity (uid/customUserId/openId/appId) in CloudBase 云函数 or Node backends.
  • User profile retrieval: Fetch full end-user profiles by uid or query users by login identifier (platform/platformId).
  • Custom login ticket issuance: Bridge an existing user system to CloudBase by generating custom login tickets for trusted clients.
  • Security/audit support: Retrieve caller IP for logging, anomaly detection, or basic access checks.

Quick Start

Use the auth-nodejs-cloudbase skill to implement CloudBase Node.js backend authentication that returns a custom login ticket to a trusted web client.

Frequently Asked Questions about auth-nodejs-cloudbase

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get caller identity in a Node.js CloudBase cloud function?▼

Retrieve caller identity in a Node.js CloudBase cloud function by initializing the CloudBase environment with @cloudbase/node-sdk and calling auth.getUserInfo to access the current caller's uid, customUserId, openId, or appId.

How does server-side custom login ticket issuance work for CloudBase?▼

Server-side custom login ticket issuance works by using auth.createTicket with @cloudbase/node-sdk to generate a custom ticket, bridging your existing user system to CloudBase for trusted web clients. This enables custom login flows.

Can I query end-user profiles by uid in a Node.js backend?▼

Yes, you can query end-user profiles by uid in a Node.js backend using the @cloudbase/node-sdk. Use auth.getEndUserInfo to fetch full profiles by uid, or auth.queryUserInfo to look up users by platform and platformId login identifiers.

What's the best way to retrieve a client IP for access checks in CloudBase?▼

The best way to retrieve a client IP for access checks in CloudBase is calling auth.getClientIP via the @cloudbase/node-sdk in your Node backend. This supports logging, basic access checks, and anomaly detection.

Do I need to initialize a CloudBase environment before using node-sdk auth methods?▼

Yes, you must initialize a CloudBase environment before using node-sdk auth methods. Server-side authentication requires CloudBase env initialization to successfully execute auth.getUserInfo, auth.createTicket, or auth.getClientIP requests.

When do I need custom login ticket exchange for web clients in CloudBase?▼

You need custom login ticket exchange for web clients in CloudBase when bridging an existing external user system to CloudBase. Generate trusted custom login tickets server-side to grant web clients authenticated access.