@manjeshrv592/auth-client
v0.2.0
Published
Auth API client for browser applications
Downloads
258
Maintainers
Readme
@manjeshrv592/auth-client
Authentication API client for browser applications.
Installation
npm install @manjeshrv592/auth-clientUsage
import { createAuthClient } from "@manjeshrv592/auth-client";
const auth = createAuthClient({
baseUrl: "/api/auth",
});
// Login
const result = await auth.login({
email: "[email protected]",
password: "password",
});
// Get current user
const user = await auth.getMe();
// Logout
await auth.logout();Features
- Login/Register with email/password
- OAuth support (Google, GitHub, Microsoft)
- Token management with auto-refresh
- MFA support
- Session management
- Password reset flow
License
MIT
