hackforla / hackforla/VRMS

Access protected API with JWT

Open
#2,067 3 comments 0 reactions 0 assignees View on GitHub
complexity: medium feature: Login role: Back End size: 2pt
Dominant language
JavaScript
Stars
61
Forks
101
PR merge metrics
No merged PRs in 30d

Description

### Overview
User Story:
As a user, I want my session to continue seamlessly when my access token expires.

### Action Items
Acceptance Criteria:
- [x] When access token is expired and API returns 401, client calls POST /auth/refresh.
- [x] Backend reads refresh token from cookie and:
- [x] if valid: returns a new access token
- [x] if invalid/expired: returns 401 and client routes to login
- [x] Client retries the original request once after successful refresh.

### Resources/Instructions
- This issue is part of the epic: #2065

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.