weird icon indicating copy to clipboard operation
weird copied to clipboard

refactor: update (app)-auth-v1-users-reset-token to new theming pattern.

Open hnb-ku opened this issue 4 months ago • 2 comments

This is part of https://github.com/muni-town/weird/issues/187, more details can be found there.

This refactor is a little bit different from the other ones.

Right now we have something like this:

image

This works great because we relay the password policy from Rauthy.

This PR proposes a slightly different way to do the same. Instead of doing the password validation again in the Svelte app, we just surface the errors from Rauthy directly.

The idea here is that it simplifies the app-side route a bit while also reducing the amount of information users have to process.

The PR makes the errors show one at a time and let users update the password (while keeping what they already typed). We get the errors directly from Rauthy.

It looks like this

image

and so on. Users can work through the errors one by one.

Server-load is not a concern here because that form won't show unless we have a csrf token (which is also generated by Rauthy) The form won't display if front-end doesn't get a csrf token from the backend.

The result is that we directly display the errors from Rauthy in the app, but we still control how things look.

As a side-note: I think the current password policy defaults lean too much on the "safe" side and we might be ok relaxing some of them to make the process a bit easier from a UX perspective.

hnb-ku avatar Oct 02 '24 22:10 hnb-ku