Skip to content

191 password authentication frontend & backend; rudimentary#196

Open
saumyapalk23 wants to merge 5 commits intomainfrom
191-auth-frontend-backend
Open

191 password authentication frontend & backend; rudimentary#196
saumyapalk23 wants to merge 5 commits intomainfrom
191-auth-frontend-backend

Conversation

@saumyapalk23
Copy link
Copy Markdown
Contributor

@saumyapalk23 saumyapalk23 commented Apr 12, 2026

ℹ️ Issue

Closes #191

📝 Description

  1. Added forgotPassword(email) and resetPassword(email, code, newPassword) to AuthContext.tsx, wired to POST /auth/forgot-password and POST /auth/reset-password
  2. Wired app/login/page.tsx to useAuth().login(), added email format and empty field validation, and fixed the "Forgot password?" link to point to /forgot-password
  3. Created app/forgot-password/page.tsx — renders the reset request form, then switches to a confirmation screen after submission
  4. Created app/reset-password/page.tsx — renders the new password form, then switches to a success screen after submission; reads email and code from Cognito query params
  5. Fixed dead href="#" links to point to /login

✔️ Verification

Navigate to /login — submit with empty fields, confirm validation errors appear; submit with a bad email format (e.g. saumyagmail.com), confirm email error appears
image

Click "Forgot password?" — confirm it navigates to /forgot-password
image

On /forgot-password, enter a valid email and click "Request reset link" — the API call will fail since POST /auth/forgot-password is not yet implemented on the backend, but the page correctly catches the error and the UI flow can still be verified
Click "Back to login" — confirm it navigates to /login
image

Navigate to /reset-password — enter mismatched or weak passwords, confirm validation errors appear; enter valid matching passwords and click "Reset Password" — the API call will fail since POST /auth/reset-password is not yet implemented
image

Click "Back to login" on the success screen — confirm it navigates to /login
image

🏕️ (Optional) Future Work / Notes

  • lowk might've said i did implement something that i forgot, so lmk
  • Backend endpoints POST /auth/forgot-password and POST /auth/reset-password still need to be implemented for the full flow -to work end to end. The frontend is fully wired and ready.
  • TextInputField does not support type="password", so password fields currently render as plain text. Should be addressed in a follow-up ticket.

@github-actions github-actions bot requested a review from Rayna-Yu April 12, 2026 21:38
@saumyapalk23 saumyapalk23 removed the request for review from Rayna-Yu April 12, 2026 21:38
github-actions bot added a commit that referenced this pull request Apr 12, 2026
@saumyapalk23 saumyapalk23 requested a review from mehanana April 12, 2026 21:38
Vaibhav978
Vaibhav978 previously approved these changes Apr 12, 2026
Copy link
Copy Markdown

@nshoreibah-kvyo nshoreibah-kvyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple questions but looks good to me!

let body = await res.json();
expect(body.message).toBe("Project not found for id: 1000");
});
test("update project test 🌞", async () => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were these tests flaking? Why'd we delete?

testEnvironment: 'node',
testMatch: ['**/*.test.ts'],
globals: { 'ts-jest': { isolatedModules: true } },
maxWorkers: 1,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also curious what this is for

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wiring auth frontend and backend

6 participants