recoverycode

This commit is contained in:
Your Name 2023-10-06 19:43:36 -04:00
parent 11fce401e7
commit 8ba92bd5b6
1 changed files with 2 additions and 0 deletions

View File

@ -17,6 +17,8 @@ func RecoverByEmail(email string) {
return
}
recoverycode := randBytes(16)
u.Delete("recoverykey")
u.Delete("recoverytime")
u.Set("recoverycode", string(recoverycode))
u.Set("recoverytime", fmt.Sprintf("%d", time.Now().Add(time.Minute*60).Unix()))