Authentication system with OAuth 2.0, JWT tokens, Keycloak, and MailHog.
- Start services:
docker-compose up -d-
Configure Keycloak (http://localhost:8080):
- Login: admin/admin
- Create realm:
myrealm - Create client:
my-app - Enable client authentication
- Add redirect URI:
http://localhost:8000/* - Copy client secret from Credentials tab
- Update
KEYCLOAK_CLIENT_SECRETin docker-compose.yml - Create user with password
-
Restart backend:
docker-compose restart backend- Access app: http://localhost:8000
- Frontend: http://localhost:8000
- Backend: http://localhost:3000
- Keycloak: http://localhost:8080
- MailHog: http://localhost:8025
- OAuth 2.0 Authorization Code Flow
- JWT token authentication
- Login/Logout with email notifications
- Protected API endpoints