summaryrefslogtreecommitdiff
path: root/src/api/auth/password.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/auth/password.rs')
-rw-r--r--src/api/auth/password.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/auth/password.rs b/src/api/auth/password.rs
index 79b7587..d1455e4 100644
--- a/src/api/auth/password.rs
+++ b/src/api/auth/password.rs
@@ -10,8 +10,8 @@ use crate::{
api::auth,
auth::{AuthSource, Authenticated},
crypto::{
- AccountResetReq, AccountResetToken, AuthPW, KeyBundle, KeyFetchReq, KeyFetchToken,
- PasswordChangeReq, PasswordChangeToken, SecretBytes,
+ random_bytes, AccountResetReq, AccountResetToken, AuthPW, KeyBundle, KeyFetchReq,
+ KeyFetchToken, PasswordChangeReq, PasswordChangeToken,
},
db::{Db, DbConn},
mailer::Mailer,
@@ -192,7 +192,7 @@ pub(crate) async fn forgot_start(
return Err(auth::Error::UnverifiedAccount);
}
- let forgot_code = hex::encode(SecretBytes::<16>::generate().0);
+ let forgot_code = hex::encode(random_bytes::<16>());
let forgot_token = PasswordChangeToken::generate();
let forgot_req = PasswordChangeReq::derive_from_forgot_token(&forgot_token);
db.add_password_change(