Documentation ¶
Index ¶
- Variables
- func GenerateOtpAndAct(secret string, cbfn func(string)) *result.Error
- func SendEmailResetPassword(targetEmail string, resetPassCode string, userId string) *result.Error
- func SendEmailVerification(targetEmail string, emailVerificationUrlCode string, userId string) *result.Error
- func StartEmailService()
- type EmailVerificationArgs
- type PendingConfirmationEmail
- type PendingResetPass
- type ResetPassArgs
Constants ¶
This section is empty.
Variables ¶
View Source
var PendingConfirmationEmailRegisterCache *utils.TtlMap[string, PendingConfirmationEmail]
View Source
var PendingResetPassCache *utils.TtlMap[string, PendingResetPass]
Functions ¶
func GenerateOtpAndAct ¶
Generates an OTP code with provided secret and launches a goroutine of a callback function.
func SendEmailResetPassword ¶
Sends an OTP code for reset password to the target email.
func SendEmailVerification ¶
func SendEmailVerification(targetEmail string, emailVerificationUrlCode string, userId string) *result.Error
Sends a OTP code for email verification to the target email.
func StartEmailService ¶
func StartEmailService()
Loads verification and reset pass email HTML template files to the cache.
"email/verification.html" "email/resetpass.html"
Starts 2 goroutines for ttlmap user register and resetting passwords.
Types ¶
type EmailVerificationArgs ¶
type PendingConfirmationEmail ¶
type PendingConfirmationEmail struct { VerificationCode string UserToCreate *db.RequiredUser }
type PendingResetPass ¶
Click to show internal directories.
Click to hide internal directories.