Documentation
¶
Index ¶
- type APIInterface
- type ConsumeCodePOSTResponse
- type ConsumeCodeResponse
- type EmailStruct
- type OverrideStruct
- type RecipeInterface
- type SignInResponse
- type SignUpResponse
- type ThirdPartySignInUp
- type ThirdPartySignInUpOutput
- type TypeInput
- type TypeInputEmailVerificationFeature
- type TypeNormalisedInput
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIInterface ¶
type APIInterface struct { AuthorisationUrlGET *func(provider tpmodels.TypeProvider, options tpmodels.APIOptions, userContext supertokens.UserContext) (tpmodels.AuthorisationUrlGETResponse, error) AppleRedirectHandlerPOST *func(code string, state string, options tpmodels.APIOptions, userContext supertokens.UserContext) error ThirdPartySignInUpPOST *func(provider tpmodels.TypeProvider, code string, authCodeResponse interface{}, redirectURI string, options tpmodels.APIOptions, userContext supertokens.UserContext) (ThirdPartySignInUpOutput, error) CreateCodePOST *func(email *string, phoneNumber *string, options plessmodels.APIOptions, userContext supertokens.UserContext) (plessmodels.CreateCodePOSTResponse, error) ResendCodePOST *func(deviceID string, preAuthSessionID string, options plessmodels.APIOptions, userContext supertokens.UserContext) (plessmodels.ResendCodePOSTResponse, error) ConsumeCodePOST *func(userInput *plessmodels.UserInputCodeWithDeviceID, linkCode *string, preAuthSessionID string, options plessmodels.APIOptions, userContext supertokens.UserContext) (ConsumeCodePOSTResponse, error) PasswordlessEmailExistsGET *func(email string, options plessmodels.APIOptions, userContext supertokens.UserContext) (plessmodels.EmailExistsGETResponse, error) PasswordlessPhoneNumberExistsGET *func(email string, options plessmodels.APIOptions, userContext supertokens.UserContext) (plessmodels.PhoneNumberExistsGETResponse, error) }
type ConsumeCodePOSTResponse ¶
type ConsumeCodePOSTResponse struct { OK *struct { CreatedNewUser bool User User Session sessmodels.SessionContainer } IncorrectUserInputCodeError *struct { FailedCodeInputAttemptCount int MaximumCodeInputAttempts int } ExpiredUserInputCodeError *struct { FailedCodeInputAttemptCount int MaximumCodeInputAttempts int } RestartFlowError *struct{} GeneralError *struct { Message string } }
type ConsumeCodeResponse ¶
type ConsumeCodeResponse struct { OK *struct { CreatedNewUser bool User User } IncorrectUserInputCodeError *struct { FailedCodeInputAttemptCount int MaximumCodeInputAttempts int } ExpiredUserInputCodeError *struct { FailedCodeInputAttemptCount int MaximumCodeInputAttempts int } RestartFlowError *struct{} }
type EmailStruct ¶
type OverrideStruct ¶
type OverrideStruct struct { Functions func(originalImplementation RecipeInterface) RecipeInterface APIs func(originalImplementation APIInterface) APIInterface EmailVerificationFeature *evmodels.OverrideStruct }
type RecipeInterface ¶
type RecipeInterface struct { GetUserByID *func(userID string, userContext supertokens.UserContext) (*User, error) GetUsersByEmail *func(email string, userContext supertokens.UserContext) ([]User, error) GetUserByPhoneNumber *func(phoneNumber string, userContext supertokens.UserContext) (*User, error) GetUserByThirdPartyInfo *func(thirdPartyID string, thirdPartyUserID string, userContext supertokens.UserContext) (*User, error) ThirdPartySignInUp *func(thirdPartyID string, thirdPartyUserID string, email EmailStruct, userContext supertokens.UserContext) (ThirdPartySignInUp, error) CreateCode *func(email *string, phoneNumber *string, userInputCode *string, userContext supertokens.UserContext) (plessmodels.CreateCodeResponse, error) CreateNewCodeForDevice *func(deviceID string, userInputCode *string, userContext supertokens.UserContext) (plessmodels.ResendCodeResponse, error) ConsumeCode *func(userInput *plessmodels.UserInputCodeWithDeviceID, linkCode *string, preAuthSessionID string, userContext supertokens.UserContext) (ConsumeCodeResponse, error) UpdatePasswordlessUser *func(userID string, email *string, phoneNumber *string, userContext supertokens.UserContext) (plessmodels.UpdateUserResponse, error) DeleteEmailForPasswordlessUser *func(userID string, userContext supertokens.UserContext) (plessmodels.DeleteUserResponse, error) DeletePhoneNumberForUser *func(userID string, userContext supertokens.UserContext) (plessmodels.DeleteUserResponse, error) RevokeAllCodes *func(email *string, phoneNumber *string, userContext supertokens.UserContext) error RevokeCode *func(codeID string, userContext supertokens.UserContext) error ListCodesByEmail *func(email string, userContext supertokens.UserContext) ([]plessmodels.DeviceType, error) ListCodesByPhoneNumber *func(phoneNumber string, userContext supertokens.UserContext) ([]plessmodels.DeviceType, error) ListCodesByDeviceID *func(deviceID string, userContext supertokens.UserContext) (*plessmodels.DeviceType, error) ListCodesByPreAuthSessionID *func(preAuthSessionID string, userContext supertokens.UserContext) (*plessmodels.DeviceType, error) }
type SignInResponse ¶
type SignInResponse struct { OK *struct { User User } WrongCredentialsError *struct{} }
type SignUpResponse ¶
type SignUpResponse struct { OK *struct { User User } EmailAlreadyExistsError *struct{} }
type ThirdPartySignInUp ¶
type ThirdPartySignInUpOutput ¶
type ThirdPartySignInUpOutput struct { OK *struct { CreatedNewUser bool User User AuthCodeResponse interface{} Session sessmodels.SessionContainer } NoEmailGivenByProviderError *struct{} FieldError *struct{ ErrorMsg string } }
type TypeInput ¶
type TypeInput struct { ContactMethodPhone plessmodels.ContactMethodPhoneConfig ContactMethodEmail plessmodels.ContactMethodEmailConfig ContactMethodEmailOrPhone plessmodels.ContactMethodEmailOrPhoneConfig FlowType string GetLinkDomainAndPath func(email *string, phoneNumber *string, userContext supertokens.UserContext) (string, error) GetCustomUserInputCode func(userContext supertokens.UserContext) (string, error) Providers []tpmodels.TypeProvider EmailVerificationFeature *TypeInputEmailVerificationFeature Override *OverrideStruct }
type TypeInputEmailVerificationFeature ¶
type TypeInputEmailVerificationFeature struct { GetEmailVerificationURL func(user User, userContext supertokens.UserContext) (string, error) CreateAndSendCustomEmail func(user User, emailVerificationURLWithToken string, userContext supertokens.UserContext) }
type TypeNormalisedInput ¶
type TypeNormalisedInput struct { ContactMethodPhone plessmodels.ContactMethodPhoneConfig ContactMethodEmail plessmodels.ContactMethodEmailConfig ContactMethodEmailOrPhone plessmodels.ContactMethodEmailOrPhoneConfig FlowType string GetLinkDomainAndPath func(email *string, phoneNumber *string, userContext supertokens.UserContext) (string, error) GetCustomUserInputCode func(userContext supertokens.UserContext) (string, error) Providers []tpmodels.TypeProvider EmailVerificationFeature evmodels.TypeInput Override OverrideStruct }
Click to show internal directories.
Click to hide internal directories.