auth-web-cloudbase
Complete guide for CloudBase Auth v2 using Web SDK (@cloudbase/[email protected]) - all login flows, user management, captcha handling, and best practices in one file.
Security Assessment
About auth-web-cloudbase
The auth-web-cloudbase skill provides a quick and easy way to implement user authentication on the web using CloudBase's Auth v3 Web SDK. It enables seamless integration of authentication features in web frontend applications, allowing developers to use various login methods such as phone OTP, email OTP, password authentication, and OAuth (Google/WeChat). This skill simplifies the process of managing user sessions, handling tokens, and offering both anonymous and registered login options for users. It is designed for developers who need to integrate authentication into their CloudBase-based applications with minimal setup.
FAQ
What are the prerequisites for using this skill?
You need a CloudBase environment ID (`env`) and CloudBase environment region (`region`) to use this skill.
Can I use this SDK for server-side authentication?
No, this SDK is specifically for web frontend authentication and is not suitable for server-side or direct HTTP API usage.
What login methods are supported?
This skill supports multiple login methods including Phone OTP, Email OTP, Password login, Registration, Anonymous login, OAuth (Google/WeChat), and Custom Ticket-based login.
What tokens are generated during the authentication process?
The skill generates two types of tokens: `access_token` (valid for 2 hours) and `refresh_token` (valid for 30 days, automatically refreshed). These tokens are stored in localStorage.
Is the setup complicated?
No, the setup is simple. You just need to initialize the SDK with your CloudBase environment ID and region, along with the publishable key from the CloudBase console. You must also configure login methods and whitelist domains in the CloudBase console.
Install auth-web-cloudbase
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
TencentCloudBase/CloudBase-MCP