Skip to content
SaViGnAnOPublic

About

Mock auth0 service for local development

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

Β 

History

1 Commit

Folders and files

Repository files navigation

AuthMan

A local Auth0 clone for development and testing. AuthMan provides a complete authentication and authorization solution with a familiar API, perfect for local development, testing, and self-hosted deployments.

Features

  • Multi-tenant architecture - Manage multiple applications and environments
  • Complete user management - Registration, authentication, profiles, and metadata
  • Application management - Support for SPAs, web apps, native apps, and M2M
  • Role-based access control (RBAC) - Fine-grained permissions and roles
  • After-action scripts - Custom JavaScript hooks for authentication events
  • Email templates - Customizable authentication emails with SMTP4Dev testing
  • Vue 3 dashboard - Web-based management interface similar to Auth0
  • SQLite database - Lightweight, file-based persistence
  • Docker ready - Complete multi-service containerized deployment
  • Email testing - Built-in SMTP4Dev for email development and testing

Quick Start

Docker Compose (Recommended)

# Start all services (API + UI + Email Testing)
docker compose up -d

# Check service status
docker compose ps

# View logs
docker compose logs -f

Access Points:

Single Container (API Only)

# Build and run API container only
docker build -t authman:latest .
docker run -d --name authman \
  -p 3001:3001 \
  -e JWT_SECRET="your-jwt-secret" \
  -e SESSION_SECRET="your-session-secret" \
  -v $(pwd)/data:/app/data \
  authman:latest

Local Development

# Start API server
npm install
node api/index.js

# Start UI dashboard (in another terminal)
cd ui && npm install && npm run dev

Access the dashboard at http://localhost:5173 and API at http://localhost:3001

Documentation

πŸ“š Complete Guides

πŸš€ Quick Links

Architecture

AuthMan follows the Auth0 API patterns and provides compatible endpoints for easy migration:

Docker Compose (Production Setup)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Vue 3 UI      β”‚    β”‚   Express API    β”‚    β”‚   SMTP4Dev      β”‚
β”‚   (nginx:8080)  │◄──►│   (node:3001)    │◄──►│   (smtp:8025)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
                               β–Ό
                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                       β”‚   SQLite DB      β”‚
                       β”‚   ./data/        β”‚
                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Local Development

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Vue 3 UI      β”‚    β”‚   Express API    β”‚    β”‚   SQLite DB     β”‚
β”‚   (Vite:5173)   │◄──►│   (node:3001)    │◄──►│   (File-based)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Supported Application Types

  • Single Page Applications (SPA) - React, Vue, Angular
  • Regular Web Applications - Server-side rendered apps
  • Native Applications - Mobile and desktop apps
  • Machine to Machine - API-to-API authentication

Email Functionality

AuthMan includes comprehensive email functionality for authentication workflows:

Features

  • Template System - Customizable email templates with variable substitution
  • SMTP4Dev Integration - Built-in email testing server for development
  • Email Logging - Track all sent emails with status and metadata
  • Template Types - Welcome, password reset, email verification, and custom templates

Email Testing (Docker Only)

# Test SMTP connection
curl http://localhost:3001/api/email/test-connection

# Send test email
curl -X POST http://localhost:3001/api/email/test \
  -H "Content-Type: application/json" \
  -d '{"to":"test@example.com","subject":"Test","body":"Hello World"}'

# Send template email
curl -X POST http://localhost:3001/api/email/send-template \
  -H "Content-Type: application/json" \
  -d '{"to":"user@example.com","templateType":"welcome_email","templateData":{"user":{"given_name":"John"},"application":{"name":"MyApp"}}}'

# View email logs
curl http://localhost:3001/api/email/logs

All emails are captured by SMTP4Dev and viewable at http://localhost:8025

Contributing

AuthMan is an open-source project. Contributions are welcome!

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

  • πŸ“– Documentation: Check the docs folder for comprehensive guides
  • πŸ› Issues: Report bugs or request features on GitHub Issues
  • πŸ’¬ Discussions: Join the community discussions for questions and ideas

AuthMan - Making authentication simple for developers. ⚑

About

Mock auth0 service for local development

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages