emailverification

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: Apache-2.0 Imports: 14 Imported by: 35

Documentation

Index

Constants

View Source
const RECIPE_ID = "emailverification"

Variables

View Source
var EmailVerificationDataForTest = struct {
	User                    evmodels.User
	EmailVerifyURLWithToken string
	UserContext             supertokens.UserContext
}{}
View Source
var EmailVerificationEmailSentForTest = false

used for testing purposes.

Functions

func AfterEach added in v0.6.8

func AfterEach()

func BeforeEach added in v0.6.8

func BeforeEach()

func CreateEmailVerificationToken

func CreateEmailVerificationToken(userID, email string) (evmodels.CreateEmailVerificationTokenResponse, error)

func CreateEmailVerificationTokenWithContext added in v0.5.0

func CreateEmailVerificationTokenWithContext(userID, email string, userContext supertokens.UserContext) (evmodels.CreateEmailVerificationTokenResponse, error)

func DefaultCreateAndSendCustomEmail

func DefaultCreateAndSendCustomEmail(appInfo supertokens.NormalisedAppinfo) func(user evmodels.User, emailVerifyURLWithToken string, userContext supertokens.UserContext)

func DefaultGetEmailVerificationURL

func DefaultGetEmailVerificationURL(appInfo supertokens.NormalisedAppinfo) func(evmodels.User, supertokens.UserContext) (string, error)

func Init

func Init(config evmodels.TypeInput) supertokens.Recipe

func IsEmailVerified

func IsEmailVerified(userID, email string) (bool, error)

func IsEmailVerifiedWithContext added in v0.5.0

func IsEmailVerifiedWithContext(userID, email string, userContext supertokens.UserContext) (bool, error)

func MakeSMTPService added in v0.7.0

func ResetForTest added in v0.4.0

func ResetForTest()

func RevokeEmailVerificationTokens

func RevokeEmailVerificationTokens(userID, email string) (evmodels.RevokeEmailVerificationTokensResponse, error)

func RevokeEmailVerificationTokensWithContext added in v0.5.0

func RevokeEmailVerificationTokensWithContext(userID, email string, userContext supertokens.UserContext) (evmodels.RevokeEmailVerificationTokensResponse, error)

func SendEmail added in v0.6.8

func SendEmail(input emaildelivery.EmailType) error

func SendEmailWithContext added in v0.6.8

func SendEmailWithContext(input emaildelivery.EmailType, userContext supertokens.UserContext) error

func UnverifyEmail

func UnverifyEmail(userID, email string) (evmodels.UnverifyEmailResponse, error)

func UnverifyEmailWithContext added in v0.5.0

func UnverifyEmailWithContext(userID, email string, userContext supertokens.UserContext) (evmodels.UnverifyEmailResponse, error)

func VerifyEmailUsingToken

func VerifyEmailUsingToken(token string) (evmodels.VerifyEmailUsingTokenResponse, error)

func VerifyEmailUsingTokenWithContext added in v0.5.0

func VerifyEmailUsingTokenWithContext(token string, userContext supertokens.UserContext) (evmodels.VerifyEmailUsingTokenResponse, error)

Types

type Recipe

type Recipe struct {
	RecipeModule  supertokens.RecipeModule
	Config        evmodels.TypeNormalisedInput
	RecipeImpl    evmodels.RecipeInterface
	APIImpl       evmodels.APIInterface
	EmailDelivery emaildelivery.Ingredient
}

func MakeRecipe

func MakeRecipe(recipeId string, appInfo supertokens.NormalisedAppinfo, config evmodels.TypeInput, emailDeliveryIngredient *emaildelivery.Ingredient, onSuperTokensAPIError func(err error, req *http.Request, res http.ResponseWriter)) (Recipe, error)

Directories

Path Synopsis
emaildelivery

Jump to

Keyboard shortcuts

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