#920-change-password #972
No reviewers
Labels
No labels
_CRITICAL_
API
app
backEnd
Blocked-waiting-for-further-changes
bug
bug-only-on-server-for-mobile-not-webpage
Bug-Report-After-Merge
cleanup
close
design
duplicate
enhancement
feature request
frontEnd
further-changes-needed
future-problem-not-fixint-this-period
help wanted
invalid
last-week-issue-to-fix
library
low-priority
needs input
needs review
not-implemented.
project documentation
question
research
reviewed
Script
security
SQL
style
Team 1
Team 2
team leaders
test-creation
testing
topLevel
unassigned
Under-review
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Andras/BoundlessFlowCampus2K!972
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "#920-change-password"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implemented password change functionality with old password verification.
Added:
I just wanted to bring attention to the change that was made to AuthResponse in pr #973. It now expects an access token and error type. Access token can just be set to null and when there is an error, an appropriate error type should be used.
Review on #920
Whats done
Password change functionality has been implemented.
Tested on Windows using PowerShell
postgresandloginService.Inspected following files
DatabaseLogic/DatabaseQueries.csUpdatePassword.UpdatePasswordis clear and works as expected.DatabaseLogic/IDatabaseQueries.csUpdatePasswordhas extra indentation.Endpoints/AuthEndpoints.cs/auth/login,/auth/SignUp,/auth/changepassword). Consider standardizing route naming for consistency.Models/Requests/ChangePasswordDto.csServices/AuthService.csChangePasswordAsync.What needs to be done
IDatabaseQueries.csFix indentation for
UpdatePassword.AuthEndpoints.csConsider standardizing auth route casing.
AuthService.csRemove extra blank lines.
Conclusion
Regarding the comment above about PR #973: I could not see the new
AuthResponsechanges being used yet. The implementation still seems to use the old constructors.Review after latest changes:
Fixed:
Remaining issues:
IDatabaseQueries.cs
succefull → successful.
AuthEndpoints.cs
/login, /SignUp, /ChangePassword
use mixed casing conventions. It would be good to standardize endpoint naming for consistency.
ChangePasswordDto.cs
tranfer to transfer.
AuthService.cs
return new AuthResponse(result ? null : "Failed to update password");
This should also follow the new AuthResponse structure introduced in PR #973.
return new AuthResponse(null, exception.Message, ErrorTypes.Internal);
It would be safer to log the internal exception and return a generic error message instead.
A AuthResponse object → An AuthResponse object.
looks good. ready to merge