@telestack/auth-sdk
v1.2.2
Published
Firebase-style fluent SDK for TelestackAuth
Downloads
834
Readme
@telestack/auth-sdk
A premium, Firebase-style fluent SDK for TelestackAuth, built on top of Better Auth.
Features
- Fluent API: Intuitive, chainable methods for authentication and user management.
- Stateful Context: Access
currentUser.profile,currentUser.security, andcurrentUser.sessionwith live updates. - Multi-Tenant Ready: Seamlessly handle multiple projects/tenants.
- Rich Plugin Support: Includes Magic Link, Passkeys, OAuth, MFA, Organizations, and more.
Installation
npm install @telestack/auth-sdkQuick Start
import { TelestackAuth } from "@telestack/auth-sdk";
// Initialize the SDK
const auth = TelestackAuth.initialize({
url: "https://your-api.telestack.run",
tenantId: "your-tenant-id"
});
// Sign in
await auth.auth.signInWithEmail({
email: "[email protected]",
password: "password123"
});
// Access current user
console.log(auth.currentUser.profile?.email);Documentation
For full documentation and advanced usage, visit telestack.run/docs.
