fix: improve password validation flow (#15132)

Refers to #14984 

Currently, password validation is done backend side and is not explicit
enough so it can be painful to create first users.
We'd like to make this validation easier - but also duplicate it
frontend side to make it smoother.

Flows involved : 
- First user set password
- New user set password
- Change password

---------

Co-authored-by: BrunoQuaresma <bruno_nonato_quaresma@hotmail.com>
This commit is contained in:
Vincent Vielle
2024-11-05 17:22:32 +01:00
committed by GitHub
parent 8b5a18cade
commit 4fe2c5f09a
21 changed files with 530 additions and 74 deletions
+30
View File
@@ -6446,6 +6446,36 @@ If the schedule is empty, the user will be updated to use the default schedule.|
| `dormant` |
| `suspended` |
## codersdk.ValidateUserPasswordRequest
```json
{
"password": "string"
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| ---------- | ------ | -------- | ------------ | ----------- |
| `password` | string | true | | |
## codersdk.ValidateUserPasswordResponse
```json
{
"details": "string",
"valid": true
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| --------- | ------- | -------- | ------------ | ----------- |
| `details` | string | false | | |
| `valid` | boolean | false | | |
## codersdk.ValidationError
```json