GenerateResetPasswordCode generates a password-reset code based on user information and the given email. The token's lifetime is bound to [conf.AuthOpts.ResetPasswordCodeLives].
(userID int64, email, name, password, rands string)
| 41 | // information and the given email. The token's lifetime is bound to |
| 42 | // [conf.AuthOpts.ResetPasswordCodeLives]. |
| 43 | func GenerateResetPasswordCode(userID int64, email, name, password, rands string) string { |
| 44 | return generateTimeLimitedUserCode(userID, email, name, password, rands, conf.Auth.ResetPasswordCodeLives) |
| 45 | } |
| 46 | |
| 47 | func generateTimeLimitedUserCode(userID int64, email, name, password, rands string, minutes int) string { |
| 48 | code := tool.CreateTimeLimitCode( |
no test coverage detected