feat(reset_password): add invitation and reset password activation basic flow
This commit is contained in:
parent
b956bdbf05
commit
8d20cab18f
14 changed files with 328 additions and 20 deletions
|
|
@ -7,8 +7,9 @@ use sqlx::types::Json;
|
|||
#[derive(strum_macros::Display)]
|
||||
#[fully_pub]
|
||||
enum UserStatus {
|
||||
Active,
|
||||
Disabled
|
||||
Disabled,
|
||||
Invited,
|
||||
Active
|
||||
}
|
||||
|
||||
#[derive(sqlx::FromRow, Deserialize, Serialize, Debug)]
|
||||
|
|
@ -24,7 +25,7 @@ struct User {
|
|||
password_hash: Option<String>, // argon2 password hash
|
||||
status: UserStatus,
|
||||
roles: Json<Vec<String>>,
|
||||
activation_token: Option<String>,
|
||||
reset_password_token: Option<String>,
|
||||
|
||||
last_login_at: Option<DateTime<Utc>>,
|
||||
created_at: DateTime<Utc>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue