Authentication

The Authentication module provides user identity management for your application.
Features
- Local Authentication - Email/password with optional verification
- OAuth Providers - 13+ social login integrations
- Two-Factor Auth - Phone OTP and authenticator app support
- Magic Links - Passwordless login via email
- Token Management - JWT access and refresh tokens
- Account Linking - Connect multiple providers to one account
Supported OAuth Providers
Available Providers
Dependencies
| Module | Required | Purpose |
|---|---|---|
| Optional | Email verification, password reset | |
| SMS | Optional | Phone-based 2FA |
Minimum Configuration
This module works out of the box with local authentication. No initial configuration required.
Environment Variables
| Name | Required | Description | Example |
|---|---|---|---|
CONDUIT_SERVER | Yes | Conduit Core address | 0.0.0.0:55152 |
SERVICE_URL | No | Service address (for load balancers) | 0.0.0.0:56154 |
GRPC_PORT | No | gRPC server port | 56154 |
GRPC_KEY | No | gRPC signed request protection | someSecret |
Quick Start
Create a User
curl -X POST 'http://localhost:3000/authentication/local/new' \
-H 'Content-Type: application/json' \
-d '{
"email": "user@example.com",
"password": "password123"
}'
Login
curl -X POST 'http://localhost:3000/authentication/local' \
-H 'Content-Type: application/json' \
-d '{
"email": "user@example.com",
"password": "password123"
}'
Response
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "abc123...",
"expiresIn": 86400
}
Authentication Strategies
| Strategy | Description | Requirements |
|---|---|---|
| Local | Email/password authentication | None |
| Magic Link | Passwordless email login | Email module |
| Two-Factor | Additional security layer | SMS or Authenticator |