Documentation ¶
Index ¶
- type APIInterface
- type APIOptions
- type CreateResetPasswordTokenResponse
- type EmailExistsGETResponse
- type GeneratePasswordResetTokenPOSTResponse
- type NormalisedFormField
- type OverrideStruct
- type PasswordPolicyViolatedError
- type RecipeInterface
- type ResetPasswordPOSTResponse
- type ResetPasswordUsingTokenResponse
- type SignInPOSTResponse
- type SignInResponse
- type SignUpPOSTResponse
- type SignUpResponse
- type TypeFormField
- type TypeInput
- 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 AppInfo supertokens.NormalisedAppinfo 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 }
type PasswordPolicyViolatedError ¶ added in v0.12.0
type PasswordPolicyViolatedError struct {
FailureReason string
}
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, applyPasswordPolicy *bool, 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 Override *OverrideStruct EmailDelivery *emaildelivery.TypeInput }
type TypeInputFormField ¶
type TypeInputResetPasswordUsingTokenFeature ¶
type TypeInputResetPasswordUsingTokenFeature struct {
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 Override OverrideStruct GetEmailDeliveryConfig func(recipeImpl RecipeInterface) emaildelivery.TypeInputWithService }
type TypeNormalisedInputResetPasswordUsingTokenFeature ¶
type TypeNormalisedInputResetPasswordUsingTokenFeature struct { 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{} PasswordPolicyViolatedError *PasswordPolicyViolatedError }
Click to show internal directories.
Click to hide internal directories.