Documentation ¶
Index ¶
- Constants
- func AfterEach()
- func Apple(config tpmodels.AppleConfig) tpmodels.TypeProvider
- func BeforeEach()
- func CreateEmailVerificationToken(userID string) (evmodels.CreateEmailVerificationTokenResponse, error)
- func CreateEmailVerificationTokenWithContext(userID string, userContext supertokens.UserContext) (evmodels.CreateEmailVerificationTokenResponse, error)
- func Discord(config tpmodels.DiscordConfig) tpmodels.TypeProvider
- func Facebook(config tpmodels.FacebookConfig) tpmodels.TypeProvider
- func GetUserByID(userID string) (*tpmodels.User, error)
- func GetUserByIDWithContext(userID string, userContext supertokens.UserContext) (*tpmodels.User, error)
- func GetUserByThirdPartyInfo(thirdPartyID, thirdPartyUserID string) (*tpmodels.User, error)
- func GetUserByThirdPartyInfoWithContext(thirdPartyID, thirdPartyUserID string, userContext supertokens.UserContext) (*tpmodels.User, error)
- func GetUsersByEmail(email string) ([]tpmodels.User, error)
- func GetUsersByEmailWithContext(email string, userContext supertokens.UserContext) ([]tpmodels.User, error)
- func Github(config tpmodels.GithubConfig) tpmodels.TypeProvider
- func Google(config tpmodels.GoogleConfig) tpmodels.TypeProvider
- func GoogleWorkspaces(config tpmodels.GoogleWorkspacesConfig) tpmodels.TypeProvider
- func Init(config *tpmodels.TypeInput) supertokens.Recipe
- func IsEmailVerified(userID string) (bool, error)
- func IsEmailVerifiedWithContext(userID string, userContext supertokens.UserContext) (bool, error)
- func MakeRecipeImplementation(querier supertokens.Querier) tpmodels.RecipeInterface
- func MakeSMTPService(config emaildelivery.SMTPServiceConfig) *emaildelivery.EmailDeliveryInterface
- func ResetForTest()
- func RevokeEmailVerificationTokens(userID string) (evmodels.RevokeEmailVerificationTokensResponse, error)
- func RevokeEmailVerificationTokensWithContext(userID string, userContext supertokens.UserContext) (evmodels.RevokeEmailVerificationTokensResponse, error)
- func SendEmail(input emaildelivery.EmailType) error
- func SendEmailWithContext(input emaildelivery.EmailType, userContext supertokens.UserContext) error
- func SignInUp(thirdPartyID string, thirdPartyUserID string, email tpmodels.EmailStruct) (tpmodels.SignInUpResponse, error)
- func SignInUpWithContext(thirdPartyID string, thirdPartyUserID string, email tpmodels.EmailStruct, ...) (tpmodels.SignInUpResponse, error)
- func UnverifyEmail(userID string) (evmodels.UnverifyEmailResponse, error)
- func UnverifyEmailWithContext(userID string, userContext supertokens.UserContext) (evmodels.UnverifyEmailResponse, error)
- func VerifyEmailUsingToken(token string) (*tpmodels.User, error)
- func VerifyEmailUsingTokenWithContext(token string, userContext supertokens.UserContext) (*tpmodels.User, error)
- type PostDataForCustomProvider
- type Recipe
Constants ¶
View Source
const ( AuthorisationAPI = "/authorisationurl" SignInUpAPI = "/signinup" AppleRedirectHandlerAPI = "/callback/apple" )
View Source
const RECIPE_ID = "thirdparty"
Variables ¶
This section is empty.
Functions ¶
func Apple ¶ added in v0.2.0
func Apple(config tpmodels.AppleConfig) tpmodels.TypeProvider
func BeforeEach ¶ added in v0.5.2
func BeforeEach()
func CreateEmailVerificationToken ¶
func CreateEmailVerificationToken(userID string) (evmodels.CreateEmailVerificationTokenResponse, error)
func CreateEmailVerificationTokenWithContext ¶ added in v0.5.0
func CreateEmailVerificationTokenWithContext(userID string, userContext supertokens.UserContext) (evmodels.CreateEmailVerificationTokenResponse, error)
func Discord ¶ added in v0.3.0
func Discord(config tpmodels.DiscordConfig) tpmodels.TypeProvider
func Facebook ¶
func Facebook(config tpmodels.FacebookConfig) tpmodels.TypeProvider
func GetUserByIDWithContext ¶ added in v0.5.0
func GetUserByIDWithContext(userID string, userContext supertokens.UserContext) (*tpmodels.User, error)
func GetUserByThirdPartyInfo ¶
func GetUserByThirdPartyInfoWithContext ¶ added in v0.5.0
func GetUserByThirdPartyInfoWithContext(thirdPartyID, thirdPartyUserID string, userContext supertokens.UserContext) (*tpmodels.User, error)
func GetUsersByEmailWithContext ¶ added in v0.5.0
func GetUsersByEmailWithContext(email string, userContext supertokens.UserContext) ([]tpmodels.User, error)
func Github ¶
func Github(config tpmodels.GithubConfig) tpmodels.TypeProvider
func Google ¶
func Google(config tpmodels.GoogleConfig) tpmodels.TypeProvider
func GoogleWorkspaces ¶ added in v0.3.0
func GoogleWorkspaces(config tpmodels.GoogleWorkspacesConfig) tpmodels.TypeProvider
func IsEmailVerified ¶
func IsEmailVerifiedWithContext ¶ added in v0.5.0
func IsEmailVerifiedWithContext(userID string, userContext supertokens.UserContext) (bool, error)
func MakeRecipeImplementation ¶
func MakeRecipeImplementation(querier supertokens.Querier) tpmodels.RecipeInterface
func MakeSMTPService ¶ added in v0.7.0
func MakeSMTPService(config emaildelivery.SMTPServiceConfig) *emaildelivery.EmailDeliveryInterface
func ResetForTest ¶ added in v0.4.0
func ResetForTest()
func RevokeEmailVerificationTokens ¶
func RevokeEmailVerificationTokens(userID string) (evmodels.RevokeEmailVerificationTokensResponse, error)
func RevokeEmailVerificationTokensWithContext ¶ added in v0.5.0
func RevokeEmailVerificationTokensWithContext(userID string, userContext supertokens.UserContext) (evmodels.RevokeEmailVerificationTokensResponse, 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 SignInUp ¶
func SignInUp(thirdPartyID string, thirdPartyUserID string, email tpmodels.EmailStruct) (tpmodels.SignInUpResponse, error)
func SignInUpWithContext ¶ added in v0.5.0
func SignInUpWithContext(thirdPartyID string, thirdPartyUserID string, email tpmodels.EmailStruct, userContext supertokens.UserContext) (tpmodels.SignInUpResponse, error)
func UnverifyEmail ¶
func UnverifyEmail(userID string) (evmodels.UnverifyEmailResponse, error)
func UnverifyEmailWithContext ¶ added in v0.5.0
func UnverifyEmailWithContext(userID string, userContext supertokens.UserContext) (evmodels.UnverifyEmailResponse, error)
func VerifyEmailUsingTokenWithContext ¶ added in v0.5.0
func VerifyEmailUsingTokenWithContext(token string, userContext supertokens.UserContext) (*tpmodels.User, error)
Types ¶
type PostDataForCustomProvider ¶ added in v0.5.2
type Recipe ¶
type Recipe struct { RecipeModule supertokens.RecipeModule Config tpmodels.TypeNormalisedInput RecipeImpl tpmodels.RecipeInterface APIImpl tpmodels.APIInterface EmailVerificationRecipe emailverification.Recipe Providers []tpmodels.TypeProvider EmailDelivery emaildelivery.Ingredient }
func MakeRecipe ¶
func MakeRecipe(recipeId string, appInfo supertokens.NormalisedAppinfo, config *tpmodels.TypeInput, emailVerificationInstance *emailverification.Recipe, 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.