zhiduozhang / full-stack-fastapi-postgresql

Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Docker, automatic HTTPS and more.
MIT License
0 stars 0 forks source link

Sweep: Allow user to change password #5

Closed zhiduozhang closed 1 year ago

zhiduozhang commented 1 year ago

Implement functionality to allow users to change their password. This will involve creating a form in the frontend views 'ResetPassword.vue' and 'UserProfileEditPassword.vue' to capture the new password and updating the backend email template 'reset_password.mjml' to include the necessary instructions for resetting the password.", Files to look at: [ "frontend/src/views/ResetPassword.vue", "frontend/src/views/main/profile/UserProfileEditPassword.vue", "backend/app/app/email-templates/src/reset_password.mjml" ]

Checklist - [ ] ``frontend/src/views/ResetPassword.vue`` - [ ] ``frontend/src/views/main/profile/UserProfileEditPassword.vue`` - [ ] ``backend/app/app/email-templates/src/reset_password.mjml`` - [ ] ``backend/app/app/api/api_v1/endpoints/reset_password.py`` ![5_flowchart.svg](http://24.199.78.105:8082/public/e6cee4326d40328c4c0bc969626c06041f83b13123ab7e5410bb9d8e8e65afa4_5_flowchart.svg)
sweep-ai[bot] commented 1 year ago
Sweeping

50%

Actions (click)


❌ Unable to Complete PR

I'm sorry, but it looks like an error has occurred. Try changing the issue description to re-trigger Sweep. If this error persists report it at https://discord.gg/sweep.

For bonus GPT-4 tickets, please report this bug on Discord (tracking ID: 7db2b680cc).


Please look at the generated plan. If something looks wrong, please add more details to your issue.

File Path Proposed Changes
frontend/src/views/ResetPassword.vue Create frontend/src/views/ResetPassword.vue with contents:
• Add a form to capture the new password and a confirmation field to confirm the new password.
• Implement form validation to ensure the new password and the confirmation match.
• Implement a function to send a request to the backend with the new password when the form is submitted.
frontend/src/views/main/profile/UserProfileEditPassword.vue Create frontend/src/views/main/profile/UserProfileEditPassword.vue with contents:
• Add a form to capture the current password, the new password, and a confirmation field to confirm the new password.
• Implement form validation to ensure the new password and the confirmation match, and that the current password is correct.
• Implement a function to send a request to the backend with the current and new password when the form is submitted.
backend/app/app/email-templates/src/reset_password.mjml Create backend/app/app/email-templates/src/reset_password.mjml with contents:
• Update the email template to include instructions for resetting the password.
backend/app/app/api/api_v1/endpoints/reset_password.py Create backend/app/app/api/api_v1/endpoints/reset_password.py with contents:
• Create a new FastAPI endpoint to handle password reset requests.
• The endpoint should accept the current password and the new password as parameters.
• Use the security module to verify the current password.
• If the current password is correct, update the user's password in the database.

🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request.