Closed ZL-Asica closed 1 week ago
jwt.ts
authToken.ts
validateAuthToken
errorHook
src/auth/
login
register
status
errorHook.ts
index.ts
src/utils/authToken.ts
auth
utils
✅ Tests Passed: All tests passed successfully!
✅ Prettier: No formatting issues found!
✅ Lint: No linting issues found!
Key Changes:
jwt.ts
toauthToken.ts
and consolidated token/cookie handling.validateAuthToken
for reusable secure route validation.errorHook
to manage unexpected errors.Files Changed:
src/auth/
: Updatedlogin
,register
, andstatus
with token auto-refresh.errorHook.ts
and applied globally inindex.ts
.src/utils/authToken.ts
: New token utility, refactored fromjwt.ts
.auth
andutils
tests for token refresh and refactor.