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:
@@ -27,8 +27,8 @@ const impersonate = () => {
|
||||
opnFetch(`/moderator/impersonate/${props.user.id}`).then(async (data) => {
|
||||
loading.value = false
|
||||
|
||||
// Save the token.
|
||||
authStore.setToken(data.token, false)
|
||||
// Save the token with its expiration time.
|
||||
authStore.setToken(data.token, data.expires_in)
|
||||
|
||||
// Fetch the user.
|
||||
const userData = await opnFetch('user')
|
||||
|
||||
Reference in New Issue
Block a user