feat: add user authentication UI to header component
Add login and register dialogs, user dropdown menu with profile link and logout option, and integrate with session management hook. Prevent hydration mismatches by conditionally rendering auth elements after mount. Update package-lock.json with new @esbuild dependencies for build tooling.
This commit is contained in:
1 parent
e641138887
commit
55eebde0ba
55 files changed
+7353
-7
No files matched your search
@@ -35,6 +35,22 @@ const RATE_LIMITS: Record<string, RateLimitConfig> = {
|
||||
maxRequests: 100,
|
||||
windowMs: 60 * 1000, // 1 minuto
|
||||
},
|
||||
"/api/auth/register": {
|
||||
maxRequests: 5,
|
||||
windowMs: 10 * 60 * 1000, // 10 minutos
|
||||
},
|
||||
"/api/auth/login": {
|
||||
maxRequests: 10,
|
||||
windowMs: 60 * 1000, // 1 minuto
|
||||
},
|
||||
"/api/auth/refresh": {
|
||||
maxRequests: 20,
|
||||
windowMs: 60 * 1000, // 1 minuto
|
||||
},
|
||||
"/api/auth/me": {
|
||||
maxRequests: 30,
|
||||
windowMs: 60 * 1000, // 1 minuto
|
||||
},
|
||||
};
|
||||
|
||||
// Limpar cache expirado a cada 5 minutos
|
||||
|
||||
Reference in new issue
Block a user