You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
Build login system using Flask/FastAPI + MongoDB. User enters email + password → backend checks → password verified → token created → user logged in → test with Postman → done.
User Story
Given user already has account When user logs in Then system should authenticate and return access token
Description:
Build login system using Flask/FastAPI + MongoDB. User enters email + password → backend checks → password verified → token created → user logged in → test with Postman → done.
User Story
Given user already has account
When user logs in
Then system should authenticate and return access token
Tasks
Backend Setup (Flask / FastAPI)
Extend Auth Module
/app/routes/auth.pyLogin API
Create Login Route
/auth/loginValidate Input
User Verification
Find User in MongoDB
userscollection by emailVerify Password
bcryptJWT Authentication
Install JWT Library
pyjwtorpython-joseGenerate Token
Return Token
Response Handling
**Postman Testing **
http://localhost:8000/auth/login{ "email": "test@gmail.com", "password": "123456" }Frontend Setup
/loginpageFrontend ↔ Backend
/auth/loginProtected Routes
Run & Validate
Acceptance Criteria
Testing Steps
Definition of Done