langflow
langflow copied to clipboard
refactor: Update package dependencies and add jwt-decode library
📝 Description
This pull request includes several changes to the frontend package dependencies and introduces a new custom token refresh hook. The most important changes are the addition of the jwt-decode package, the implementation of the useCustomTokenRefresh hook, and its integration into the AuthProvider component.
Dependency Updates:
- Added
jwt-decodepackage topackage.jsonandpackage-lock.jsonto handle JWT token decoding. [1] [2] [3]
New Feature:
- Implemented
useCustomTokenRefreshhook insrc/frontend/src/customization/hooks/use-custom-token-refresh.tsto handle automatic token refresh based on expiration time.
Integration:
- Integrated
useCustomTokenRefreshhook intoAuthProvidercomponent to ensure tokens are refreshed periodically. [1] [2]