otp

package
v0.0.0-...-3b1d222 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const OtpTimeout = 30 * 1000 * 1000 * 1000

Redis OtpTimeout

Variables

This section is empty.

Functions

func GenerateOtp

func GenerateOtp(email string) string

func GetSecretFromRedis

func GetSecretFromRedis(email string) string

func StoreSecretOnRedis

func StoreSecretOnRedis(secretKey string, email string, timeout int) bool

Store value on RedisClient with this format: passcode@<username>, <username> should be replaced with any valid username

func ValidateOtp

func ValidateOtp(passcode string, email string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL