emailverification

package
v0.0.0-...-bd06354 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

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

func AfterEach()

func BeforeEach

func BeforeEach()
func CreateEmailVerificationLink(tenantId string, userID string, email *string, userContext ...supertokens.UserContext) (evmodels.CreateEmailVerificationLinkResponse, error)

func CreateEmailVerificationToken

func CreateEmailVerificationToken(tenantId string, userID string, 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 Init

func Init(config evmodels.TypeInput) supertokens.Recipe

func IsEmailVerified

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

func NewEmailVerificationClaim

key string, fetchValue claims.FetchValueFunc

func ResetForTest

func ResetForTest()

func RevokeEmailVerificationTokens

func RevokeEmailVerificationTokens(tenantId string, userID string, email *string, userContext ...supertokens.UserContext) (evmodels.RevokeEmailVerificationTokensResponse, error)

func SendEmail

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

func SendEmailVerificationEmail

func SendEmailVerificationEmail(tenantId string, userID string, email *string, userContext ...supertokens.UserContext) (evmodels.SendEmailVerificationLinkResponse, error)

func UnverifyEmail

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

func VerifyEmailUsingToken

func VerifyEmailUsingToken(tenantId string, 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

	GetEmailForUserID        evmodels.TypeGetEmailForUserID
	AddGetEmailForUserIdFunc func(function evmodels.TypeGetEmailForUserID)
}

func GetRecipeInstance

func GetRecipeInstance() *Recipe

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