@auth-mate/providers
v1.1.0
Published
OAuth provider implementations for Auth Mate
Readme
@auth-mate/providers
OAuth provider implementations for Auth Mate authentication library.
Installation
npm install @auth-mate/providers
# or
yarn add @auth-mate/providers
# or
pnpm add @auth-mate/providersSupported Providers
- GitHub
- Microsoft
- Custom providers
Usage
import { createProvider } from '@auth-mate/providers';
const provider = createProvider('google', {
clientId: 'your-client-id',
redirectUri: 'http://localhost:3000/callback',
scope: 'openid profile email'
});
// Get authorization URL
const authUrl = await provider.getAuthUrl();
// Handle callback
const tokens = await provider.handleCallback(code);
// Get user info
const user = await provider.getUserInfo(tokens.access_token);Documentation
For full documentation, visit auth-mate.dev.
License
MIT
