Documentation ¶
Index ¶
- type APIInterface
- type APIOptions
- type AccessTokenAPI
- type AppleClientSecret
- type AppleConfig
- type AuthorisationRedirect
- type AuthorisationUrlGETResponse
- type DiscordConfig
- type EmailStruct
- type FacebookConfig
- type GithubConfig
- type GoogleConfig
- type GoogleWorkspacesConfig
- type OverrideStruct
- type RecipeInterface
- type SignInUpPOSTResponse
- type SignInUpResponse
- type TypeInput
- type TypeInputEmailVerificationFeature
- type TypeInputSignInAndUp
- type TypeNormalisedInput
- type TypeNormalisedInputSignInAndUp
- type TypeProvider
- type TypeProviderGetResponse
- type User
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIInterface ¶
type APIInterface struct { AuthorisationUrlGET *func(provider TypeProvider, options APIOptions, userContext supertokens.UserContext) (AuthorisationUrlGETResponse, error) SignInUpPOST *func(provider TypeProvider, code string, authCodeResponse interface{}, redirectURI string, options APIOptions, userContext supertokens.UserContext) (SignInUpPOSTResponse, error) AppleRedirectHandlerPOST *func(code string, state string, options APIOptions, userContext supertokens.UserContext) error }
type APIOptions ¶
type APIOptions struct { RecipeImplementation RecipeInterface EmailVerificationRecipeImplementation evmodels.RecipeInterface Config TypeNormalisedInput RecipeID string Providers []TypeProvider Req *http.Request Res http.ResponseWriter OtherHandler http.HandlerFunc AppInfo supertokens.NormalisedAppinfo EmailDelivery emaildelivery.Ingredient }
type AccessTokenAPI ¶
type AppleClientSecret ¶ added in v0.2.0
type AppleConfig ¶ added in v0.2.0
type AppleConfig struct { ClientID string ClientSecret AppleClientSecret Scope []string AuthorisationRedirect *struct { Params map[string]interface{} } IsDefault bool }
type AuthorisationRedirect ¶
type AuthorisationUrlGETResponse ¶
type AuthorisationUrlGETResponse struct { OK *struct{ Url string } GeneralError *supertokens.GeneralErrorResponse }
type DiscordConfig ¶ added in v0.3.0
type EmailStruct ¶
type FacebookConfig ¶
type GithubConfig ¶
type GoogleConfig ¶
type GoogleWorkspacesConfig ¶ added in v0.3.0
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) GetUserByThirdPartyInfo *func(thirdPartyID string, thirdPartyUserID string, userContext supertokens.UserContext) (*User, error) SignInUp *func(thirdPartyID string, thirdPartyUserID string, email EmailStruct, userContext supertokens.UserContext) (SignInUpResponse, error) }
type SignInUpPOSTResponse ¶
type SignInUpPOSTResponse struct { OK *struct { CreatedNewUser bool User User Session sessmodels.SessionContainer AuthCodeResponse interface{} } NoEmailGivenByProviderError *struct{} GeneralError *supertokens.GeneralErrorResponse }
type SignInUpResponse ¶
type TypeInput ¶
type TypeInput struct { SignInAndUpFeature TypeInputSignInAndUp 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 TypeInputSignInAndUp ¶
type TypeInputSignInAndUp struct {
Providers []TypeProvider
}
type TypeNormalisedInput ¶
type TypeNormalisedInput struct { SignInAndUpFeature TypeNormalisedInputSignInAndUp EmailVerificationFeature evmodels.TypeInput Override OverrideStruct GetEmailDeliveryConfig func(recipeImpl RecipeInterface) emaildelivery.TypeInputWithService }
type TypeNormalisedInputSignInAndUp ¶
type TypeNormalisedInputSignInAndUp struct {
Providers []TypeProvider
}
type TypeProvider ¶
type TypeProvider struct { ID string Get func(redirectURI *string, authCodeFromRequest *string, userContext supertokens.UserContext) TypeProviderGetResponse IsDefault bool }
type TypeProviderGetResponse ¶
type TypeProviderGetResponse struct { AccessTokenAPI AccessTokenAPI AuthorisationRedirect AuthorisationRedirect GetProfileInfo func(authCodeResponse interface{}, userContext supertokens.UserContext) (UserInfo, error) GetClientId func(userContext supertokens.UserContext) string GetRedirectURI func(userContext supertokens.UserContext) (string, error) }
type UserInfo ¶
type UserInfo struct { ID string Email *EmailStruct }
Click to show internal directories.
Click to hide internal directories.