Add DragonflyDB integration for JWT revocation and implement rate limiting for authentication routes
All checks were successful
Build & Push Docker Image / build (push) Successful in 6m14s

This commit is contained in:
2026-02-28 13:37:27 +01:00
parent ed97587248
commit 3556aaede7
8 changed files with 251 additions and 5 deletions

View File

@@ -38,7 +38,12 @@ export function AuthProvider({ children }) {
return res.data.user;
}, []);
const logout = useCallback(() => {
const logout = useCallback(async () => {
try {
await api.post('/auth/logout');
} catch {
// ignore — token is removed locally regardless
}
localStorage.removeItem('token');
setUser(null);
}, []);