Documentation ¶
Index ¶
- Constants
- Variables
- func AfterEach()
- func BeforeEach()
- func CreateResetPasswordToken(userID string) (epmodels.CreateResetPasswordTokenResponse, error)
- func CreateResetPasswordTokenWithContext(userID string, userContext supertokens.UserContext) (epmodels.CreateResetPasswordTokenResponse, error)
- func DefaultCreateAndSendCustomPasswordResetEmail(appInfo supertokens.NormalisedAppinfo) func(user epmodels.User, passwordResetURLWithToken string, ...)
- func GetUserByEmail(email string) (*epmodels.User, error)
- func GetUserByEmailWithContext(email string, userContext supertokens.UserContext) (*epmodels.User, error)
- func GetUserByID(userID string) (*epmodels.User, error)
- func GetUserByIDWithContext(userID string, userContext supertokens.UserContext) (*epmodels.User, error)
- func Init(config *epmodels.TypeInput) supertokens.Recipe
- func MakeRecipeImplementation(querier supertokens.Querier) epmodels.RecipeInterface
- func MakeSMTPService(config emaildelivery.SMTPServiceConfig) *emaildelivery.EmailDeliveryInterface
- func NormaliseSignUpFormFields(formFields []epmodels.TypeInputFormField) []epmodels.NormalisedFormField
- func ResetForTest()
- func ResetPasswordUsingToken(token string, newPassword string) (epmodels.ResetPasswordUsingTokenResponse, error)
- func ResetPasswordUsingTokenWithContext(token string, newPassword string, userContext supertokens.UserContext) (epmodels.ResetPasswordUsingTokenResponse, error)
- func SendEmail(input emaildelivery.EmailType) error
- func SendEmailWithContext(input emaildelivery.EmailType, userContext supertokens.UserContext) error
- func SignIn(email string, password string) (epmodels.SignInResponse, error)
- func SignInWithContext(email string, password string, userContext supertokens.UserContext) (epmodels.SignInResponse, error)
- func SignUp(email string, password string) (epmodels.SignUpResponse, error)
- func SignUpWithContext(email string, password string, userContext supertokens.UserContext) (epmodels.SignUpResponse, error)
- func UpdateEmailOrPassword(userId string, email *string, password *string) (epmodels.UpdateEmailOrPasswordResponse, error)
- func UpdateEmailOrPasswordWithContext(userId string, email *string, password *string, ...) (epmodels.UpdateEmailOrPasswordResponse, error)
- type Recipe
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 BeforeEach ¶ added in v0.5.2
func BeforeEach()
func CreateResetPasswordToken ¶
func CreateResetPasswordToken(userID string) (epmodels.CreateResetPasswordTokenResponse, error)
func CreateResetPasswordTokenWithContext ¶ added in v0.5.0
func CreateResetPasswordTokenWithContext(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 GetUserByEmailWithContext ¶ added in v0.5.0
func GetUserByEmailWithContext(email string, userContext supertokens.UserContext) (*epmodels.User, error)
func GetUserByIDWithContext ¶ added in v0.5.0
func GetUserByIDWithContext(userID string, userContext supertokens.UserContext) (*epmodels.User, error)
func MakeRecipeImplementation ¶
func MakeRecipeImplementation(querier supertokens.Querier) epmodels.RecipeInterface
func MakeSMTPService ¶ added in v0.7.0
func MakeSMTPService(config emaildelivery.SMTPServiceConfig) *emaildelivery.EmailDeliveryInterface
func NormaliseSignUpFormFields ¶
func NormaliseSignUpFormFields(formFields []epmodels.TypeInputFormField) []epmodels.NormalisedFormField
func ResetForTest ¶ added in v0.4.0
func ResetForTest()
func ResetPasswordUsingToken ¶
func ResetPasswordUsingToken(token string, newPassword string) (epmodels.ResetPasswordUsingTokenResponse, error)
func ResetPasswordUsingTokenWithContext ¶ added in v0.5.0
func ResetPasswordUsingTokenWithContext(token string, newPassword string, userContext supertokens.UserContext) (epmodels.ResetPasswordUsingTokenResponse, 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 SignInWithContext ¶ added in v0.5.0
func SignInWithContext(email string, password string, userContext supertokens.UserContext) (epmodels.SignInResponse, error)
func SignUpWithContext ¶ added in v0.5.0
func SignUpWithContext(email string, password string, userContext supertokens.UserContext) (epmodels.SignUpResponse, error)
func UpdateEmailOrPassword ¶
func UpdateEmailOrPasswordWithContext ¶ added in v0.5.0
func UpdateEmailOrPasswordWithContext(userId string, email *string, password *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 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)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.