nycolasdiaas/zarea-de-risco
Implement JWT Authentication for Secure API Access
Ouverte
#72 ouverte le 20 janv. 2025
enhancementgood first issue
Métriques du dépôt
- Stars
- (1 étoile)
- Métriques de merge PR
- (Aucune PR mergée en 30 j)
Description
Implement JWT authentication in the backend (Flask) to secure API access and ensure only authorized requests from the frontend (Axios) are allowed.
Tasks:
- Add flask-jwt-extended to handle authentication.
- Create /login endpoint to issue JWT tokens.
- Protect API routes with @jwt_required().
- Implement token expiration and refresh logic.
- Integrate JWT handling in frontend requests using Axios.
Acceptance Criteria:
- Users receive a JWT token upon successful login.
- Protected routes allow only authenticated requests.
- Expired tokens can be refreshed securely.
- Unauthorized requests return proper HTTP status codes.