@authjoyio/core
v0.1.5
Published
Core SDK for AuthJoy - Google Identity Platform wrapper
Downloads
688
Maintainers
Readme
@authjoy/core
Core SDK for auth-joy - A developer-friendly wrapper around Google Identity Platform.
Installation
npm install @authjoy/core
# or
pnpm add @authjoy/core
# or
yarn add @authjoy/coreQuick Start
import { AuthJoyClient } from '@authjoy/core';
// Initialize the client
const auth = new AuthJoyClient({
apiKey: 'your-api-key',
authDomain: 'your-project.firebaseapp.com',
projectId: 'your-project-id',
});
// Sign up with email/password
const result = await auth.email.signUp('[email protected]', 'password123');
console.log('User created:', result.user);
// Sign in
const signInResult = await auth.email.signIn('[email protected]', 'password123');
console.log('Signed in:', signInResult.user);
// Listen to auth state changes
auth.onAuthStateChanged((user) => {
if (user) {
console.log('User is signed in:', user);
} else {
console.log('User is signed out');
}
});Features
- Email/Password Authentication
- Magic Links (Passwordless)
- Multi-Factor Authentication (SMS & TOTP)
- SSO (SAML & OIDC)
- Social Providers (Google, Facebook, Twitter, GitHub)
- Full TypeScript support
- Framework-agnostic
Documentation
Coming soon!
License
MIT
