auth-nodejs-cloudbase

Implement CloudBase Node.js authentication workflows for identity, user lookup, and ticket issuance.

72|5|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/TencentCloudBase/skills --skill auth-nodejs-cloudbase
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auth-nodejs-cloudbase
Source: https://github.com/TencentCloudBase/skills/tree/main/skills/auth-nodejs
Command: npx skills add https://github.com/TencentCloudBase/skills --skill auth-nodejs-cloudbase

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a clear, Node.js‑based approach to perform CloudBase authentication workflows in server-side code, enabling secure caller identity, user lookups, and custom login ticket issuance.

Core Features & Use Cases

  • Caller identity: read the current user's information from the Node SDK in CloudBase Cloud Functions or services.
  • User lookup & profile access: retrieve end-user information by uid or by login identifiers, or query by platform + id.
  • Custom login integration: issue and exchange custom login tickets to bridge existing user systems with CloudBase.
  • Security best practices: enforce least-privilege access and safe handling of credentials in server-side code.

Quick Start

Install the CloudBase Node SDK, initialize with your environment, then call auth.getUserInfo(), auth.getEndUserInfo(), auth.queryUserInfo(), and auth.createTicket(...) as needed to implement your backend auth flows.

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 CloudBase Cloud Functions using Node.js?

To get caller identity in CloudBase Cloud Functions, use the Node SDK to call auth.getUserInfo() within your Node.js server-side code. This retrieves the current user's information securely from the request context.

How do I retrieve end-user information by uid or login identifier in CloudBase?

Retrieve CloudBase end-user information by calling auth.getEndUserInfo() or auth.queryUserInfo() via the Node SDK. You can look up user profiles by uid, login identifiers, or query by platform and id.

Can I use CloudBase custom login to bridge my existing user system with Node.js?

Yes, you can bridge existing user systems with CloudBase using Node.js. Call auth.createTicket() from the Node SDK to issue and exchange custom login tickets, requiring optional credentials for ticket issuance.

What's the best way to enforce security for server-side CloudBase authentication workflows?

Enforce security in CloudBase authentication workflows by applying least-privilege access and safe credential handling in your Node.js code. Use canonical SDK patterns like getClientIP() to validate caller context securely.

Do I need to install the CloudBase Node SDK to perform server-side authentication?

Yes, you must install the CloudBase Node SDK to perform server-side authentication. Initialize it with your environment, then call auth methods like getUserInfo and createTicket to implement your backend auth flows.

Why does my CloudBase custom login ticket issuance fail in Node services?

Custom login ticket issuance via auth.createTicket() fails when optional credentials are missing or incorrectly configured. Ensure your Node.js service has the proper CloudBase environment initialization and valid credentials for ticket bridging.