Documentation ¶
Index ¶
- type APIInterface
- type APIOptions
- type CreateResetPasswordTokenResponse
- type EmailExistsGETResponse
- type GeneratePasswordResetTokenPOSTResponse
- type NormalisedFormField
- type OverrideStruct
- type RecipeInterface
- type ResetPasswordPOSTResponse
- type ResetPasswordUsingTokenResponse
- type SignInPOSTResponse
- type SignInResponse
- type SignUpPOSTResponse
- type SignUpResponse
- type TypeFormField
- type TypeInput
- type TypeInputEmailVerificationFeature
- type TypeInputFormField
- type TypeInputResetPasswordUsingTokenFeature
- type TypeInputSignUp
- type TypeNormalisedInput
- type TypeNormalisedInputResetPasswordUsingTokenFeature
- type TypeNormalisedInputSignIn
- type TypeNormalisedInputSignUp
- type UpdateEmailOrPasswordResponse
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIInterface ¶
type APIInterface struct { EmailExistsGET *func(email string, options APIOptions, userContext supertokens.UserContext) (EmailExistsGETResponse, error) GeneratePasswordResetTokenPOST *func(formFields []TypeFormField, options APIOptions, userContext supertokens.UserContext) (GeneratePasswordResetTokenPOSTResponse, error) PasswordResetPOST *func(formFields []TypeFormField, token string, options APIOptions, userContext supertokens.UserContext) (ResetPasswordPOSTResponse, error) SignInPOST *func(formFields []TypeFormField, options APIOptions, userContext supertokens.UserContext) (SignInPOSTResponse, error) SignUpPOST *func(formFields []TypeFormField, options APIOptions, userContext supertokens.UserContext) (SignUpPOSTResponse, error) }
type APIOptions ¶
type APIOptions struct { RecipeImplementation RecipeInterface EmailVerificationRecipeImplementation evmodels.RecipeInterface Config TypeNormalisedInput RecipeID string Req *http.Request Res http.ResponseWriter OtherHandler http.HandlerFunc EmailDelivery emaildelivery.Ingredient }
type CreateResetPasswordTokenResponse ¶
type CreateResetPasswordTokenResponse struct { OK *struct { Token string } UnknownUserIdError *struct{} }
type EmailExistsGETResponse ¶
type EmailExistsGETResponse struct { OK *struct{ Exists bool } GeneralError *supertokens.GeneralErrorResponse }
type GeneratePasswordResetTokenPOSTResponse ¶
type GeneratePasswordResetTokenPOSTResponse struct { OK *struct{} GeneralError *supertokens.GeneralErrorResponse }
type NormalisedFormField ¶
type OverrideStruct ¶
type OverrideStruct struct { Functions func(originalImplementation RecipeInterface) RecipeInterface APIs func(originalImplementation APIInterface) APIInterface EmailVerificationFeature *evmodels.OverrideStruct }
type RecipeInterface ¶
type RecipeInterface struct { SignUp *func(email string, password string, userContext supertokens.UserContext) (SignUpResponse, error) SignIn *func(email string, password string, userContext supertokens.UserContext) (SignInResponse, error) GetUserByID *func(userID string, userContext supertokens.UserContext) (*User, error) GetUserByEmail *func(email string, userContext supertokens.UserContext) (*User, error) CreateResetPasswordToken *func(userID string, userContext supertokens.UserContext) (CreateResetPasswordTokenResponse, error) ResetPasswordUsingToken *func(token string, newPassword string, userContext supertokens.UserContext) (ResetPasswordUsingTokenResponse, error) UpdateEmailOrPassword *func(userId string, email *string, password *string, userContext supertokens.UserContext) (UpdateEmailOrPasswordResponse, error) }
type ResetPasswordPOSTResponse ¶ added in v0.7.0
type ResetPasswordPOSTResponse struct { OK *struct { UserId *string } ResetPasswordInvalidTokenError *struct{} GeneralError *supertokens.GeneralErrorResponse }
type ResetPasswordUsingTokenResponse ¶
type ResetPasswordUsingTokenResponse struct { OK *struct { UserId *string } ResetPasswordInvalidTokenError *struct{} }
type SignInPOSTResponse ¶ added in v0.5.0
type SignInPOSTResponse struct { OK *struct { User User Session sessmodels.SessionContainer } WrongCredentialsError *struct{} GeneralError *supertokens.GeneralErrorResponse }
type SignInResponse ¶
type SignInResponse struct { OK *struct { User User } WrongCredentialsError *struct{} }
type SignUpPOSTResponse ¶ added in v0.5.0
type SignUpPOSTResponse struct { OK *struct { User User Session sessmodels.SessionContainer } EmailAlreadyExistsError *struct{} GeneralError *supertokens.GeneralErrorResponse }
type SignUpResponse ¶
type SignUpResponse struct { OK *struct { User User } EmailAlreadyExistsError *struct{} }
type TypeFormField ¶
type TypeInput ¶
type TypeInput struct { SignUpFeature *TypeInputSignUp ResetPasswordUsingTokenFeature *TypeInputResetPasswordUsingTokenFeature EmailVerificationFeature *TypeInputEmailVerificationFeature Override *OverrideStruct EmailDelivery *emaildelivery.TypeInput }
type TypeInputEmailVerificationFeature ¶
type TypeInputEmailVerificationFeature struct { GetEmailVerificationURL func(user User, userContext supertokens.UserContext) (string, error) CreateAndSendCustomEmail func(user User, emailVerificationURLWithToken string, userContext supertokens.UserContext) // Deprecated: Use EmailDelivery instead. }
type TypeInputFormField ¶
type TypeInputResetPasswordUsingTokenFeature ¶
type TypeInputResetPasswordUsingTokenFeature struct { GetResetPasswordURL func(user User, userContext supertokens.UserContext) (string, error) CreateAndSendCustomEmail func(user User, passwordResetURLWithToken string, userContext supertokens.UserContext) // Deprecated: Use EmailDelivery instead. }
type TypeInputSignUp ¶
type TypeInputSignUp struct {
FormFields []TypeInputFormField
}
type TypeNormalisedInput ¶
type TypeNormalisedInput struct { SignUpFeature TypeNormalisedInputSignUp SignInFeature TypeNormalisedInputSignIn ResetPasswordUsingTokenFeature TypeNormalisedInputResetPasswordUsingTokenFeature EmailVerificationFeature evmodels.TypeInput Override OverrideStruct GetEmailDeliveryConfig func(recipeImpl RecipeInterface) emaildelivery.TypeInputWithService }
type TypeNormalisedInputResetPasswordUsingTokenFeature ¶
type TypeNormalisedInputResetPasswordUsingTokenFeature struct { GetResetPasswordURL func(user User, userContext supertokens.UserContext) (string, error) FormFieldsForGenerateTokenForm []NormalisedFormField FormFieldsForPasswordResetForm []NormalisedFormField }
type TypeNormalisedInputSignIn ¶
type TypeNormalisedInputSignIn struct {
FormFields []NormalisedFormField
}
type TypeNormalisedInputSignUp ¶
type TypeNormalisedInputSignUp struct {
FormFields []NormalisedFormField
}
type UpdateEmailOrPasswordResponse ¶
type UpdateEmailOrPasswordResponse struct { OK *struct{} UnknownUserIdError *struct{} EmailAlreadyExistsError *struct{} }
Click to show internal directories.
Click to hide internal directories.