#332332nd of 358 in Backends, databases and hosting
spring-boot-jwt
Spring Boot JWT auth service with rotating, revocable refresh tokens
Run it:RackNerd ↗ (opens in a new tab)RepoCloud ↗ (opens in a new tab)Affiliate links, no effect on a rank.
- Stars
- 1.7k
- License
- MIT
- Last commit
- Oct 2026
- Language
- Java
1,658 on 28 Apr 20261,690 on 24 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
A Spring Boot 3.5 / Java 17 REST API that implements signup, signin, refresh and logout using Spring Security. Access tokens are stateless HMAC-SHA256 JWTs (JJWT 0.12.x); refresh tokens are opaque, stored as SHA-256 hashes, single-use, with reuse detection that revokes all of a user's tokens. Runs on in-memory H2 by default, with MySQL as an option, and exposes SpringDoc OpenAPI docs.
Who it is for: Java developers needing a reference JWT auth backend with Spring Security
Strengths
- Refresh tokens are hashed at rest, single-use, with reuse detection revoking all user tokens
- Ordinary requests need no database lookup for authentication; only refresh hits the DB
- Role checks via @PreAuthorize with ROLE_ADMIN and ROLE_CLIENT, plus OpenAPI docs
- Small, readable code layout with a controller test and CI workflow
Weaknesses
- Access tokens cannot be revoked before expiry; only lifetime tuning limits exposure
- Default config is H2 in-memory with create-drop schema, not production-ready
- H2 console is permitted in security config and must be disabled for production
- No tagged releases; it is a demo service, not a packaged library
What it needs
- no GPU
- Docker
- Needs Java 17, H2 (default, in-memory), MySQL (optional)
- port 8080
Also in Backends, databases and hosting
See all 358| Rank | Project | Score |
|---|---|---|
| #330 | dbGo data access layer with one API for SQL databases and MongoDB | 39 out of 100 |
| #331 | devise_token_authToken-based authentication gem for Rails APIs, built on Devise and OmniAuth | 39 out of 100 |
| #333 | filodbDistributed in-memory time series database with PromQL, fed from Kafka | 39 out of 100 |
| #334 | dicedbValkey fork that spills evicted keys to disk via RocksDB | 37 out of 100 |
| #335 | flask-sqlalchemyFlask extension that integrates SQLAlchemy with app config and sessions | 36 out of 100 |