What problem does it solve?
CloudBase Web projects often struggle with getting reliable login, OTP verification, session persistence, and protected-route checks working correctly—especially when frontend teams use the wrong SDK calls or validate login state incorrectly.
Core Features & Use Cases
- Supabase-like Auth API: Provides consistent
{ data, error } patterns across sign-in, sign-up, sign-out, session handling, and user/profile operations for frontend teams.
- Multiple login methods: Supports username/password, phone OTP, email OTP, OAuth, custom ticket, and ID-token flows with the right wiring patterns for each.
- Reliable auth guards: Guides correct use of
auth.getSession() instead of deprecated or misleading login-state checks, preventing routes from granting access without a real session.
- User management: Covers update profile, change/reset password, identity linking/unlinking, account deletion, and auth state change subscriptions.
- Use Case: You’re building an admin dashboard in Vue/Vite and need a working login/register flow (including OTP) plus a protected route that only opens after a confirmed CloudBase session exists.
Quick Start
Wire a CloudBase Web login flow for your existing frontend by initializing @cloudbase/js-sdk with a publishable key, then implement username/password or OTP send+verify and protect routes using getSession().