I got tired of rebuilding auth from scratch on every Spring Boot project, so I made this
**I got tired of rebuilding auth from scratch on every Spring Boot project, so I made this**
Every new project, same story — JWT setup, OAuth2, email verification, password reset flows... it's tedious and eats up time before you even touch your actual business logic.
So I built a reusable authentication module you can just clone and drop into any Spring Boot project.
🔗 **[spring-auth-starter](Peter19570/Spring-Boot-Auth-Starter: A reusable Spring Boot authentication starter with JWT, OAuth2, email verification, and more. Clone, configure, and go.)**
---
**What's included:**
- JWT Authentication (access + refresh tokens, stored in DB, properly invalidated on logout)
- OAuth2 Social Login (Google, extensible to others)
- Email Verification on registration and password reset
- OTP-based flows for password reset and email change
- Rate Limiting on login and registration
- Audit Logging for critical actions (stored in DB)
- Soft Delete support
- Social Account Linking & Unlinking
- Async email sending (fast API responses)
- Flexible token handling — supports both HTTP-only cookies and Bearer tokens automatically
**Getting started is just:**
- Clone the repo
- Fill in your `application.properties` (DB, SMTP, JWT secret, OAuth2 credentials)
- Run it
All auth logic lives in its own `authentication` folder — completely separate from your business logic. Just build around it.
Feedback, suggestions, and PRs are welcome 🙏