nycolasdiaas/zarea-de-risco

Implement JWT Authentication for Secure API Access

オープン

#72 opened on 2025/01/20

 (0 件のコメント) (0 件のリアクション) (1 人の担当者)Jupyter Notebook (0 件のフォーク)auto 404
enhancementgood first issue

Repository metrics

Stars
 (1 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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.

コントリビューターガイド