Authentication
Secure user authentication for your application
Add secure authentication to your app with just a few lines of code.
Supported Providers
Quick Setup
1
Install the SDKnpm install @demo/auth2
Initializeimport { Auth } from '@demo/auth';
const auth = new Auth({
apiKey: 'your-api-key'
});3
Add Sign Inawait auth.signIn({
email: 'user@example.com',
password: 'secure-password'
});Session Management
Sessions are automatically managed and persisted. User state is available across page reloads.
// Check current user
const user = auth.currentUser;
// Listen for auth changes
auth.onAuthStateChange((user) => {
console.log('User:', user);
});