Skip to content

Conversation

@thmasq
Copy link

@thmasq thmasq commented Aug 8, 2025

Description

Implement change password component in Settings/Account. The component uses matrix-js-sdk's setpassword function, and completes the full authentication flow to set a new password. No new dependencies are needed.

Further changes might be necessary to properly match the visual style of Cinny, but I'm not great at frontend development.

Closes #2417

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@thmasq
Copy link
Author

thmasq commented Aug 8, 2025

I have read the CLA Document and I hereby sign the CLA

ajbura added a commit to cinnyapp/cla that referenced this pull request Aug 8, 2025
@github-actions
Copy link

github-actions bot commented Aug 9, 2025

Preview: https://2419--pr-cinny.netlify.app
⚠️ Exercise caution. Use test accounts. ⚠️

Copy link
Member

@ajbura ajbura left a comment

Choose a reason for hiding this comment

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

Apart from the requested changes can we remove the inline comment added at various places as most of the changes are self explanatory and doesn't really need comment.

Comment on lines +58 to +59
Your password has been successfully changed. Your other devices may need to be
re-verified.
Copy link
Member

Choose a reason for hiding this comment

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

What is it mean to "other devices may need to be re-verified"?


<Box direction="Column" gap="100">
<Box alignItems="Center" gap="200">
<input type="checkbox" id="logoutDevices" name="logoutDevices" defaultChecked />
Copy link
Member

Choose a reason for hiding this comment

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

please use the Checkbox component from folds

<Box alignItems="Center" gap="200">
<input type="checkbox" id="logoutDevices" name="logoutDevices" defaultChecked />
<Text as="label" htmlFor="logoutDevices" size="T300">
Sign out all other devices
Copy link
Member

Choose a reason for hiding this comment

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

Cinny uses "Logout" instead of term "Signout" in all places.

Comment on lines +255 to +256
Recommended for security. Unchecking this may leave your other devices logged
in.
Copy link
Member

Choose a reason for hiding this comment

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

We can remove recommendation as it is already widely known, and set the default checkbox to true.

Comment on lines +270 to +282
<Box gap="200" justifyContent="End">
<Button type="button" variant="Secondary" onClick={onCancel} disabled={isLoading}>
<Text as="span" size="B400">
Cancel
</Text>
</Button>
<Button variant="Primary" type="submit" disabled={isLoading}>
{isLoading && <Spinner variant="Primary" size="300" />}
<Text as="span" size="B400">
Change Password
</Text>
</Button>
</Box>
Copy link
Member

Choose a reason for hiding this comment

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

Cinny design language uses the "Column" layout for button. And we do not need the cancel button as dialog header already has the Cross button.

* @param logoutDevices Whether to logout other devices (defaults to true for security)
* @returns Tuple with either auth data (for UIA continuation) or success response
*/
export const changePassword = async (
Copy link
Member

Choose a reason for hiding this comment

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

As this function will not be reused at multiple places it is not counted as utility. We should just moved it to the same file it is used.

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.

Change password from account settings

2 participants