Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a "change my password" page #226

Open
lkeegan opened this issue Jan 29, 2025 · 0 comments · May be fixed by #234
Open

Add a "change my password" page #226

lkeegan opened this issue Jan 29, 2025 · 0 comments · May be fixed by #234
Labels
enhancement New feature or request frontend good first issue Good for newcomers

Comments

@lkeegan
Copy link
Member

lkeegan commented Jan 29, 2025

Is your feature request related to a problem? Please describe.
Users can request a password reset if they have forgotten their password, but they should also be able to change their password.

Describe the solution you'd like
A page where they can enter a new password, where they should enter:

  • their current password
  • their new password
  • their new password again

Additional context
The backend provides a PATCH /users/me endpoint to modify the current user:

https://mondey.lkeegan.dev/api/docs#/users/users_patch_current_user_users_me_patch

The frontend has auto-generated client code to interact with the backend, here is the corresponding function:

export const usersPatchCurrentUser = <ThrowOnError extends boolean = false>(options: Options<UsersPatchCurrentUserData, ThrowOnError>) => {
return (options?.client ?? client).patch<UsersPatchCurrentUserResponse, UsersPatchCurrentUserError, ThrowOnError>({
...options,
url: '/users/me'
});
};

where UsersPatchCurrentUserData is a type definition generated from the API:

export type UsersPatchCurrentUserData = {
body: UserUpdate;
};

export type UserUpdate = {
password?: (string | null);
email?: (string | null);
is_active?: (boolean | null);
is_superuser?: (boolean | null);
is_verified?: (boolean | null);
is_researcher?: (boolean | null);
full_data_access?: (boolean | null);
research_group_id?: (number | null);
};

@lkeegan lkeegan added enhancement New feature or request frontend good first issue Good for newcomers labels Jan 29, 2025
@MaHaWo MaHaWo added this to the Initial production version milestone Mar 4, 2025
@MaHaWo MaHaWo linked a pull request Mar 7, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants