Enhance JWT Token Management and Authentication Flow (#720)

- Implement extended token lifetime for "Remember Me" functionality
- Add token expiration details to authentication responses
- Update client-side token handling to support dynamic expiration
- Modify authentication middleware to handle token initialization more robustly
- Configure JWT configuration to support longer token lifetimes
This commit is contained in:
Julien Nahum
2025-03-10 17:32:17 +08:00
committed by GitHub
parent 06328a47ab
commit a5162192b1
10 changed files with 63 additions and 20 deletions

View File

@@ -101,7 +101,19 @@ return [
|
*/
'ttl' => (int) env('JWT_TTL', 60),
'ttl' => (int) env('JWT_TTL', 60 * 24 * 7),
/*
|--------------------------------------------------------------------------
| Extended JWT time to live (Remember Me)
|--------------------------------------------------------------------------
|
| Specify the length of time (in minutes) that the token will be valid for
| when the "Remember me" option is selected. Defaults to 30 days.
|
*/
'remember_ttl' => (int) env('JWT_REMEMBER_TTL', 60 * 24 * 30),
/*
|--------------------------------------------------------------------------