nycolasdiaas/zarea-de-risco

Implement JWT Authentication for Secure API Access

开放

#72 创建于 2025年1月20日

 (0 条评论) (0 个反应) (1 位负责人)Jupyter Notebook (0 个派生)auto 404
enhancementgood first issue

仓库指标

星标
 (1 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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.

贡献者指南