Commit 053d619
authored
Mariano/portal login 3 (#2276)
* feat(auth): enhance security with rate limiting and redirect URL validation
- Implemented in-memory rate limiting for authentication requests to mitigate brute force attacks, with stricter limits for sensitive endpoints.
- Added redirect URL validation to prevent open redirects, allowing only specified hosts.
- Improved logging for rate limit exceedances during development.
- Cleaned up old rate limit entries periodically to optimize memory usage.
- Updated the OTP form to remove unnecessary API_URL declaration.
* refactor(auth): update environment variable usage for base URL
- Changed references from AUTH_BASE_URL and BETTER_AUTH_URL to BASE_URL for consistency in cookie domain handling.
- Updated comments to clarify the purpose of BASE_URL in relation to OAuth callbacks and cookie domains.
* refactor(auth): update base URL configuration for auth client
- Changed baseURL in authClient to use NEXT_PUBLIC_API_URL or default to 'http://localhost:3333' for improved environment configuration.
- This change enhances flexibility for different deployment environments.1 parent f216975 commit 053d619
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
0 commit comments