emailpassword

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: Apache-2.0 Imports: 13 Imported by: 18

Documentation

Index

Constants

View Source
const RECIPE_ID = "emailpassword"

Variables

This section is empty.

Functions

func CreateEmailVerificationToken

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

func CreateResetPasswordToken

func CreateResetPasswordToken(userID string) (epmodels.CreateResetPasswordTokenResponse, error)

func GetUserByEmail

func GetUserByEmail(email string) (*epmodels.User, error)

func GetUserByID

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

func Init

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

func IsEmailVerified

func IsEmailVerified(userID string) (bool, error)

func MakeRecipeImplementation

func MakeRecipeImplementation(querier supertokens.Querier) epmodels.RecipeInterface

func NormaliseSignUpFormFields

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

func ResetPasswordUsingToken

func ResetPasswordUsingToken(token string, newPassword string) (epmodels.ResetPasswordUsingTokenResponse, error)

func RevokeEmailVerificationTokens

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

func SignIn

func SignIn(email string, password string) (epmodels.SignInResponse, error)

func SignUp

func SignUp(email string, password string) (epmodels.SignUpResponse, error)

func UnverifyEmail

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

func UpdateEmailOrPassword

func UpdateEmailOrPassword(userId string, email *string, password *string) (epmodels.UpdateEmailOrPasswordResponse, error)

func VerifyEmailUsingToken

func VerifyEmailUsingToken(token string) (*epmodels.User, error)

Types

type Recipe

type Recipe struct {
	RecipeModule            supertokens.RecipeModule
	Config                  epmodels.TypeNormalisedInput
	RecipeImpl              epmodels.RecipeInterface
	APIImpl                 epmodels.APIInterface
	EmailVerificationRecipe emailverification.Recipe
}

func MakeRecipe

func MakeRecipe(recipeId string, appInfo supertokens.NormalisedAppinfo, config *epmodels.TypeInput, emailVerificationInstance *emailverification.Recipe, onGeneralError func(err error, req *http.Request, res http.ResponseWriter)) (Recipe, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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