emailpassword

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 25 Imported by: 18

Documentation

Index

Constants

View Source
const RECIPE_ID = "emailpassword"

Variables

View Source
var PasswordResetDataForTest = struct {
	User                      epmodels.User
	PasswordResetURLWithToken string
	UserContext               supertokens.UserContext
}{}
View Source
var PasswordResetEmailSentForTest = false

Functions

func AfterEach added in v0.5.2

func AfterEach()

func BeforeEach added in v0.5.2

func BeforeEach()
func CreateResetPasswordLink(tenantId string, userID string, userContext ...supertokens.UserContext) (epmodels.CreateResetPasswordLinkResponse, error)

func CreateResetPasswordToken

func CreateResetPasswordToken(tenantId string, userID string, userContext ...supertokens.UserContext) (epmodels.CreateResetPasswordTokenResponse, error)

func DefaultCreateAndSendCustomPasswordResetEmail added in v0.6.8

func DefaultCreateAndSendCustomPasswordResetEmail(appInfo supertokens.NormalisedAppinfo) func(user epmodels.User, passwordResetURLWithToken string, userContext supertokens.UserContext)

func GetUserByEmail

func GetUserByEmail(tenantId string, email string, userContext ...supertokens.UserContext) (*epmodels.User, error)

func GetUserByID

func GetUserByID(userID string, userContext ...supertokens.UserContext) (*epmodels.User, error)

func Init

func Init(config *epmodels.TypeInput) supertokens.Recipe

func MakeRecipeImplementation

func MakeRecipeImplementation(querier supertokens.Querier, getEmailPasswordConfig func() epmodels.TypeNormalisedInput) epmodels.RecipeInterface

func MakeSMTPService added in v0.7.0

func NormaliseSignUpFormFields

func NormaliseSignUpFormFields(formFields []epmodels.TypeInputFormField) []epmodels.NormalisedFormField

func ResetForTest added in v0.4.0

func ResetForTest()

func ResetPasswordUsingToken

func ResetPasswordUsingToken(tenantId string, token string, newPassword string, userContext ...supertokens.UserContext) (epmodels.ResetPasswordUsingTokenResponse, error)

func SendEmail added in v0.6.8

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

func SendResetPasswordEmail added in v0.13.0

func SendResetPasswordEmail(tenantId string, userID string, userContext ...supertokens.UserContext) (epmodels.SendResetPasswordEmailResponse, error)

func SignIn

func SignIn(tenantId string, email string, password string, userContext ...supertokens.UserContext) (epmodels.SignInResponse, error)

func SignUp

func SignUp(tenantId string, email string, password string, userContext ...supertokens.UserContext) (epmodels.SignUpResponse, error)

func UpdateEmailOrPassword

func UpdateEmailOrPassword(userId string, email *string, password *string, applyPasswordPolicy *bool, tenantIdForPasswordPolicy *string, userContext ...supertokens.UserContext) (epmodels.UpdateEmailOrPasswordResponse, error)

Types

type Recipe

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

func GetRecipeInstance added in v0.9.9

func GetRecipeInstance() *Recipe

func GetRecipeInstanceOrThrowError added in v0.9.14

func GetRecipeInstanceOrThrowError() (*Recipe, error)

func MakeRecipe

func MakeRecipe(recipeId string, appInfo supertokens.NormalisedAppinfo, config *epmodels.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