Documentation ¶
Index ¶
- Constants
- Variables
- func AfterEach()
- func BeforeEach()
- func CreateEmailVerificationLink(tenantId string, userID string, email *string, ...) (evmodels.CreateEmailVerificationLinkResponse, error)
- func CreateEmailVerificationToken(tenantId string, userID string, email *string, ...) (evmodels.CreateEmailVerificationTokenResponse, error)
- func DefaultCreateAndSendCustomEmail(appInfo supertokens.NormalisedAppinfo) func(user evmodels.User, emailVerifyURLWithToken string, ...)
- func Init(config evmodels.TypeInput) supertokens.Recipe
- func IsEmailVerified(userID string, email *string, userContext ...supertokens.UserContext) (bool, error)
- func MakeSMTPService(config emaildelivery.SMTPServiceConfig) *emaildelivery.EmailDeliveryInterface
- func NewEmailVerificationClaim() (*claims.TypeSessionClaim, evclaims.TypeEmailVerificationClaimValidators)
- func RevokeEmailVerificationTokens(tenantId string, userID string, email *string, ...) (evmodels.RevokeEmailVerificationTokensResponse, error)
- func SendEmail(input emaildelivery.EmailType, userContext ...supertokens.UserContext) error
- func SendEmailVerificationEmail(tenantId string, userID string, email *string, ...) (evmodels.SendEmailVerificationLinkResponse, error)
- func UnverifyEmail(userID string, email *string, userContext ...supertokens.UserContext) (evmodels.UnverifyEmailResponse, error)
- func VerifyEmailUsingToken(tenantId string, token string, userContext ...supertokens.UserContext) (evmodels.VerifyEmailUsingTokenResponse, error)
- type Recipe
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 BeforeEach ¶ added in v0.6.8
func BeforeEach()
func CreateEmailVerificationLink ¶ added in v0.13.0
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 IsEmailVerified ¶
func IsEmailVerified(userID string, email *string, userContext ...supertokens.UserContext) (bool, error)
func MakeSMTPService ¶ added in v0.7.0
func MakeSMTPService(config emaildelivery.SMTPServiceConfig) *emaildelivery.EmailDeliveryInterface
func NewEmailVerificationClaim ¶ added in v0.9.0
func NewEmailVerificationClaim() (*claims.TypeSessionClaim, evclaims.TypeEmailVerificationClaimValidators)
key string, fetchValue claims.FetchValueFunc
func RevokeEmailVerificationTokens ¶
func RevokeEmailVerificationTokens(tenantId string, userID string, email *string, userContext ...supertokens.UserContext) (evmodels.RevokeEmailVerificationTokensResponse, error)
func SendEmail ¶ added in v0.6.8
func SendEmail(input emaildelivery.EmailType, userContext ...supertokens.UserContext) error
func SendEmailVerificationEmail ¶ added in v0.13.0
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 ¶ added in v0.9.0
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)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.