refactor: update (app)-auth-v1-users-reset-token to new theming pattern. #200
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is part of #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:
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
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.