# Build CloudBase Node Auth Flows

Server-side CloudBase auth work can mix caller identity, user lookup, and custom login details. This skill guides Node.js agents through correct SDK methods and secure backend patterns.

## Install

```bash
npx skillstore add tencentcloudbase/auth-nodejs-cloudbase
```

## Metadata

- Status: approved
- Slug: tencentcloudbase-auth-nodejs-cloudbase
- Version: 2.23.8
- Author version: 2.23.8
- Skillstore revision: r1
- Version status: valid
- Tree hash: 6a49d3747de9dc1f38c627257d4f22e2e3304abc42e00225a83a7941a6cd7045
- Author: tencentcloudbase
- GitHub username: tencentcloudbase
- License: MIT
- Repository: https://github.com/tencentcloudbase/skills/tree/main/skills/auth-nodejs
- Ref: 24b2fe42a456262f3fd0fb3df72e12d9ed2c32ec
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: scripts, external\_commands, network, filesystem
- Quality score: 82
- Quality tier: silver
- Public page: https://skillstore.pages.dev/skills/tencentcloudbase-auth-nodejs-cloudbase
- Manifest: https://skillstore.pages.dev/api/skills/tencentcloudbase-auth-nodejs-cloudbase/manifest

## Capabilities

- Initialize CloudBase Node SDK auth in backend functions and services.
- Read current caller identity with getUserInfo for authorization decisions.
- Look up CloudBase users by uid or login identifier.
- Issue custom login tickets for existing user systems.
- Apply guidance for client IP logging and sensitive data handling.
- Route provider setup, web login UI, and raw HTTP auth work to the right skills.

## Use Cases

- Authorize Cloud Functions: Read caller identity in a CloudBase function and use uid or customUserId for access checks.
- Inspect User Records: Query CloudBase end-user profiles from trusted server-side admin tools.
- Bridge Existing Accounts: Create custom login tickets after an external user system authenticates a user.

## Prompt Templates

### Identify Current Caller

```
Use the auth-nodejs-cloudbase skill to show how my Node CloudBase function can read the current caller identity and choose the right user identifier.
```

### Look Up a User

```
Use the auth-nodejs-cloudbase skill to design a trusted Node backend flow that looks up a CloudBase user by uid, phone, email, or custom user ID.
```

### Issue Custom Tickets

```
Use the auth-nodejs-cloudbase skill to create a Node-side custom login ticket flow for users authenticated by my existing account system.
```

### Review Auth Boundaries

```
Use the auth-nodejs-cloudbase skill to review my CloudBase Node auth plan for backend-only responsibilities, sensitive logging, and client handoff boundaries.
```

## Limitations

- Does not configure CloudBase auth providers or publishable keys.
- Does not build frontend login or sign-up interfaces.
- Does not document raw HTTP auth endpoints.
- Requires official CloudBase SDK documentation for APIs outside the listed methods.

## Best Practices

- Use uid as the primary CloudBase user identifier in backend authorization checks.
- Keep custom login credential files only on trusted servers or CloudBase functions.
- Return only the user fields that clients need, and avoid full profile logging.

## Anti Patterns

- Using this skill for frontend login UI instead of web auth guidance.
- Exposing getEndUserInfo or queryUserInfo results directly to untrusted clients.
- Creating custom login tickets before the external user is authenticated.

## Security Audit

- Audited at: 2026-07-09T15:18:12.876\+00:00
- Summary: The static score is driven by Markdown code spans, documentation URLs, sibling-skill path references, and private-key handling guidance in SKILL.md. I found no prompt injection, executable scripts, outbound callbacks, path traversal behavior, or embedded secrets.

## Stats

- Views: 0
- Downloads: 7
- Favorites: 1
- Popularity score: 0
