Fastest Setup: Hosted Login Page or One-Tag Button
If you are building with Cursor, Claude, Lovable, or plain HTML, you do not need to code signup/login forms yourself. Redirect users to Vybase's hosted login page—it automatically renders every method enabled in your console (Google, WhatsApp/SMS OTP, Email OTP, Password, Continue with Zyvraon) and returns them signed in with PKCE.
import { createClient } from "https://console.zyvraone.site/sdk/vybase.js";
const zyv = createClient("https://auth.zyvraone.site", "<pk_publishable_key>");
document.getElementById("login-btn").onclick = () => zyv.auth.signInWithHostedPage();
zyv.auth.onAuthStateChange((event, session) => {
if (event === "SIGNED_IN") console.log("Signed in user:", session.user);
});
<script src="https://console.zyvraone.site/button.js" defer></script>
<vybase-login api="https://auth.zyvraone.site" key="<pk_publishable_key>"></vybase-login>
Email + Password, WhatsApp OTP, SMS OTP & Zero-Setup Google
Every SDK method resolves to { data, error } and never throws on API errors. Branch safely on error.code.
// 1. Email + Password
const { data, error } = await zyv.auth.signUp({ email, password, redirectTo: location.origin });
await zyv.auth.signInWithPassword({ email, password });
// 2. Email, WhatsApp, or SMS 6-digit OTP (auto creates user on first verify)
await zyv.auth.signInWithOtp({ phone: "+919876543210", channel: "whatsapp" });
await zyv.auth.verifyOtp({ phone: "+919876543210", code: "482910" });
// 3. Zero-Setup Continue with Google or Continue with Zyvraon
await zyv.auth.signInWithOAuth({ provider: "google", redirectTo: location.origin });
await zyv.auth.signInWithOAuth({ provider: "zyvraon", redirectTo: location.origin });
// 4. Native Mobile Google ID Token (Android / iOS)
await zyv.auth.signInWithIdToken({ provider: "google", token: googleIdToken });
// 5. Session & Password Recovery
await zyv.auth.resetPasswordForEmail({ email, redirectTo: location.origin });
await zyv.auth.signOut({ scope: "global" });
localhost works automatically in development. Before going live, add your production URL (e.g. https://myapp.zyvraone.site/*) in Console → Auth → URL configuration.
Flutter / Dart Auth SDK
import 'package:vybase/vybase.dart';
final zyv = Vybase(url: 'https://auth.zyvraone.site', key: '<pk_publishable_key>', storage: SecureStorage());
await zyv.auth.signInWithOtp(phone: '+919876543210', channel: OtpChannel.whatsapp);
await zyv.auth.verifyOtp(phone: '+919876543210', code: '482910');
final user = await zyv.auth.getUser();
Verify JWTs & Administer Users on Your Backend
Vybase issues ES256 JWT access tokens (15-minute expiry) with iss: https://auth.zyvraone.site, aud: <project_id>, and sub: <user_id>. Verify them offline using the public JWKS endpoint.
// Node.js / TypeScript
import { createRemoteJWKSet, jwtVerify } from "jose";
const jwks = createRemoteJWKSet(new URL("https://auth.zyvraone.site/.well-known/jwks.json"));
const { payload } = await jwtVerify(token, jwks, {
issuer: "https://auth.zyvraone.site",
audience: "prj_...",
});
# Python server SDK (pip install vybase)
from vybase import Vybase
zyv = Vybase("https://auth.zyvraone.site", secret_key=os.environ["VYBASE_SECRET_KEY"], project_id="prj_...")
claims = zyv.verify_token(bearer_token)
REST Endpoints & Error Codes
Pass x-zyvraon-key: pk_... (or x-vybase-key) on every call, plus Authorization: Bearer <access_token> for authenticated user actions.
POST /v1/auth/signup·POST /v1/auth/login·POST /v1/auth/otp/send·POST /v1/auth/otp/verifyPOST /v1/auth/refresh·POST /v1/auth/recover·POST /v1/auth/token·POST /v1/auth/idtoken·POST /v1/auth/logoutGET/PATCH /v1/auth/user·GET /v1/auth/settings·GET /.well-known/openid-configuration- Stable error codes:
email_taken,invalid_credentials,email_not_verified,otp_invalid,rate_limited,provider_disabled,redirect_not_allowed,sms_unavailable,whatsapp_unavailable,user_banned,session_expired,validation_failed.