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.