auth-web-cloudbase

Implement CloudBase Web authentication with @cloudbase/js-sdk for login, registration, and protected routes.

2|1|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/lxb031018/qintu --skill auth-web-cloudbase-lxb031018
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auth-web-cloudbase
Source: https://github.com/lxb031018/qintu/tree/main/.codebuddy/skills/auth-web
Command: npx skills add https://github.com/lxb031018/qintu --skill auth-web-cloudbase-lxb031018

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you implement CloudBase Web authentication flows in a frontend project without getting stuck on missing provider setup, wrong session handling, or wiring the login UI to the correct SDK calls.

Core Features & Use Cases

  • Web frontend authentication with @cloudbase/js-sdk: Use CloudBase environment ID, region, and publishable access key to initialize auth and enable session detection in URL.
  • Multiple login and session flows: Support phone OTP, email OTP, password, anonymous login, OAuth (Google/WeChat), and custom ticket sign-in.
  • User management built for real apps: Perform sign out, get user profile, update user metadata, link/unlink identities, delete account, and react to auth state changes.
  • Use Case: Add a login page to a Web app that authenticates users via phone OTP, verifies the code, then redirects them to a protected route with the session already established.

Quick Start

Use the auth initialization shown in this guide, then wire your existing login/register button handlers to call auth.signInWithOtp and data.verifyOtp with the token you collect from the UI.

Frequently Asked Questions about auth-web-cloudbase

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

FAQPage Schema
How do I initialize CloudBase Web authentication in a frontend project?

To initialize CloudBase Web authentication, configure the cloudbase instance with your environment ID, region, publishable access key, and enable auth.detectSessionInUrl to automatically handle session detection for protected routes.

How do I implement phone OTP login and verification using @cloudbase/js-sdk?

Implement phone OTP login by calling auth.signInWithOtp with the user's phone number, then capture the token from your UI and pass it to data.verifyOtp to complete the sign-in and establish the user session.

Does CloudBase authentication support OAuth providers like Google and WeChat?

Yes, CloudBase authentication supports OAuth login for providers like Google and WeChat, alongside phone OTP, email OTP, password, anonymous login, and custom ticket sign-in methods for flexible frontend access.

Can I manage user profiles and identities after CloudBase Web login?

Yes, after CloudBase Web login you can perform user management tasks including signing out, fetching profiles, updating metadata, linking or unlinking identities, deleting accounts, and reacting to auth state changes.

What is the best way to handle session-aware protected routes with CloudBase?

The best way to handle protected routes is enabling auth.detectSessionInUrl during CloudBase initialization, which allows your frontend to detect existing sessions automatically and secure route access without manual token checks.

Why does my CloudBase Web authentication flow fail despite correct SDK calls?

CloudBase Web authentication flows often fail if the OAuth provider setup is incomplete or missing in your environment, even when your frontend SDK initialization and sign-in method calls are implemented correctly.