Add a way to reset password (WIP)
This commit is contained in:
parent
ebdcb6a90a
commit
5d343c273f
8 changed files with 265 additions and 12 deletions
|
|
@ -4,11 +4,14 @@ pub const FILE_CONF: &str = "conf.ron";
|
|||
pub const DB_DIRECTORY: &str = "data";
|
||||
pub const DB_FILENAME: &str = "recipes.sqlite";
|
||||
pub const SQL_FILENAME: &str = "sql/version_{VERSION}.sql";
|
||||
pub const VALIDATION_TOKEN_DURATION: i64 = 1 * 60 * 60; // 1 hour. [s].
|
||||
pub const VALIDATION_TOKEN_DURATION: i64 = 1 * 60 * 60; // [s]. (1 jour).
|
||||
pub const COOKIE_AUTH_TOKEN_NAME: &str = "auth_token";
|
||||
|
||||
// Number of alphanumeric characters for cookie authentication token.
|
||||
pub const AUTHENTICATION_TOKEN_SIZE: usize = 32;
|
||||
pub const VALIDATION_PASSWORD_RESET_TOKEN_DURATION: i64 = 1 * 60 * 60; // [s]. (1 jour).
|
||||
|
||||
// Number of alphanumeric characters for tokens
|
||||
// (cookie authentication, password reset, validation token).
|
||||
pub const TOKEN_SIZE: usize = 32;
|
||||
|
||||
pub const SEND_EMAIL_TIMEOUT: Duration = Duration::from_secs(60);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue