Authentication SDK (AuthaaS)
Project End-User Auth & User Management
Native project-scoped user authentication, JWT sessions, role management, and admin CRUD for customer applications.
Initialize Auth Client
typescript
import { indx } from "@/indxbase";
// Initialize project auth client
const auth = indx.projectAuth.createClient("YOUR_PROJECT_ID");Register End-User
typescript
const session = await auth.signUp({
email: "developer@example.com",
password: "SecurePassword123!",
displayName: "Alex Developer",
});
console.log("Access Token:", session.access_token);Login End-User
typescript
const session = await auth.signInWithPassword({
email: "developer@example.com",
password: "SecurePassword123!",
});Admin User Management
typescript
// List project end-users
const users = await auth.listUsers();
// Create new user (Admin)
await auth.createUser({
email: "new.user@example.com",
password: "UserPassword123!",
displayName: "New User",
role: "member",
});
// Update role or suspend account
await auth.updateUser(userId, { status: "suspended" });
// Delete user account
await auth.deleteUser(userId);