Documentation ¶
Index ¶
- Constants
- Variables
- func AfterEach()
- func BeforeEach()
- func ConsumeCodeWithLinkCode(tenantId string, linkCode string, preAuthSessionID string, ...) (tplmodels.ConsumeCodeResponse, error)
- func ConsumeCodeWithUserInputCode(tenantId string, deviceID string, userInputCode string, ...) (tplmodels.ConsumeCodeResponse, error)
- func CreateCodeWithEmail(tenantId string, email string, userInputCode *string, ...) (plessmodels.CreateCodeResponse, error)
- func CreateCodeWithPhoneNumber(tenantId string, phoneNumber string, userInputCode *string, ...) (plessmodels.CreateCodeResponse, error)
- func CreateMagicLinkByEmail(tenantId string, email string, userContext ...supertokens.UserContext) (string, error)
- func CreateMagicLinkByPhoneNumber(tenantId string, phoneNumber string, userContext ...supertokens.UserContext) (string, error)
- func CreateNewCodeForDevice(tenantId string, deviceID string, userInputCode *string, ...) (plessmodels.ResendCodeResponse, error)
- func DeleteEmailForPasswordlessUser(userID string, userContext ...supertokens.UserContext) (plessmodels.DeleteUserResponse, error)
- func DeletePhoneNumberForUser(userID string, userContext ...supertokens.UserContext) (plessmodels.DeleteUserResponse, error)
- func GetUserByID(userID string, userContext ...supertokens.UserContext) (*tplmodels.User, error)
- func GetUserById(userID string, userContext ...supertokens.UserContext) (*tplmodels.User, error)
- func GetUserByPhoneNumber(tenantId string, phoneNumber string, userContext ...supertokens.UserContext) (*tplmodels.User, error)
- func GetUserByThirdPartyInfo(tenantId string, thirdPartyID string, thirdPartyUserID string, ...) (*tplmodels.User, error)
- func GetUsersByEmail(tenantId string, email string, userContext ...supertokens.UserContext) ([]tplmodels.User, error)
- func Init(config tplmodels.TypeInput) supertokens.Recipe
- func ListCodesByDeviceID(tenantId string, deviceID string, userContext ...supertokens.UserContext) (*plessmodels.DeviceType, error)
- func ListCodesByEmail(tenantId string, email string, userContext ...supertokens.UserContext) ([]plessmodels.DeviceType, error)
- func ListCodesByPhoneNumber(tenantId string, phoneNumber string, userContext ...supertokens.UserContext) ([]plessmodels.DeviceType, error)
- func ListCodesByPreAuthSessionID(tenantId string, preAuthSessionID string, ...) (*plessmodels.DeviceType, error)
- func MakeSMTPService(config emaildelivery.SMTPServiceConfig) *emaildelivery.EmailDeliveryInterface
- func MakeSupertokensSMSService(apiKey string) *smsdelivery.SmsDeliveryInterface
- func MakeTwilioService(config smsdelivery.TwilioServiceConfig) (*smsdelivery.SmsDeliveryInterface, error)
- func PasswordlessSignInUpByEmail(tenantId string, email string, userContext ...supertokens.UserContext) (struct{ ... }, error)
- func PasswordlessSignInUpByPhoneNumber(tenantId string, phoneNumber string, userContext ...supertokens.UserContext) (struct{ ... }, error)
- func ResetForTest()
- func RevokeAllCodesByEmail(tenantId string, email string, userContext ...supertokens.UserContext) error
- func RevokeAllCodesByPhoneNumber(tenantId string, phoneNumber string, userContext ...supertokens.UserContext) error
- func RevokeCode(tenantId string, codeID string, userContext ...supertokens.UserContext) error
- func SendEmail(input emaildelivery.EmailType, userContext ...supertokens.UserContext) error
- func SendSms(input smsdelivery.SmsType, userContext ...supertokens.UserContext) error
- func ThirdPartyGetProvider(tenantId string, thirdPartyID string, clientType *string, ...) (*tpmodels.TypeProvider, error)
- func ThirdPartyManuallyCreateOrUpdateUser(tenantId string, thirdPartyID string, thirdPartyUserID string, email string, ...) (tplmodels.ManuallyCreateOrUpdateUserResponse, error)
- func UpdatePasswordlessUser(userID string, email *string, phoneNumber *string, ...) (plessmodels.UpdateUserResponse, error)
- type PostDataForCustomProvider
- type Recipe
Constants ¶
View Source
const RECIPE_ID = "thirdpartypasswordless"
Variables ¶
View Source
var SigninupCustomProvider1 = tpmodels.ProviderInput{ Config: tpmodels.ProviderConfig{ ThirdPartyId: "custom", Clients: []tpmodels.ProviderClientConfig{ { ClientID: "supertokens", }, }, AuthorizationEndpoint: "https://test.com/oauth/auth", TokenEndpoint: "https://test.com/oauth/token", }, Override: func(originalImplementation *tpmodels.TypeProvider) *tpmodels.TypeProvider { originalImplementation.GetUserInfo = func(oAuthTokens tpmodels.TypeOAuthTokens, userContext supertokens.UserContext) (tpmodels.TypeUserInfo, error) { return tpmodels.TypeUserInfo{ ThirdPartyUserId: "user", Email: &tpmodels.EmailStruct{ ID: "email@test.com", IsVerified: true, }, }, nil } return originalImplementation }, }
Functions ¶
func BeforeEach ¶
func BeforeEach()
func ConsumeCodeWithLinkCode ¶
func ConsumeCodeWithLinkCode(tenantId string, linkCode string, preAuthSessionID string, userContext ...supertokens.UserContext) (tplmodels.ConsumeCodeResponse, error)
func ConsumeCodeWithUserInputCode ¶
func ConsumeCodeWithUserInputCode(tenantId string, deviceID string, userInputCode string, preAuthSessionID string, userContext ...supertokens.UserContext) (tplmodels.ConsumeCodeResponse, error)
func CreateCodeWithEmail ¶
func CreateCodeWithEmail(tenantId string, email string, userInputCode *string, userContext ...supertokens.UserContext) (plessmodels.CreateCodeResponse, error)
func CreateCodeWithPhoneNumber ¶
func CreateCodeWithPhoneNumber(tenantId string, phoneNumber string, userInputCode *string, userContext ...supertokens.UserContext) (plessmodels.CreateCodeResponse, error)
func CreateMagicLinkByEmail ¶
func CreateMagicLinkByEmail(tenantId string, email string, userContext ...supertokens.UserContext) (string, error)
func CreateMagicLinkByPhoneNumber ¶
func CreateMagicLinkByPhoneNumber(tenantId string, phoneNumber string, userContext ...supertokens.UserContext) (string, error)
func CreateNewCodeForDevice ¶
func CreateNewCodeForDevice(tenantId string, deviceID string, userInputCode *string, userContext ...supertokens.UserContext) (plessmodels.ResendCodeResponse, error)
func DeleteEmailForPasswordlessUser ¶
func DeleteEmailForPasswordlessUser(userID string, userContext ...supertokens.UserContext) (plessmodels.DeleteUserResponse, error)
func DeletePhoneNumberForUser ¶
func DeletePhoneNumberForUser(userID string, userContext ...supertokens.UserContext) (plessmodels.DeleteUserResponse, error)
func GetUserByID ¶
func GetUserByID(userID string, userContext ...supertokens.UserContext) (*tplmodels.User, error)
func GetUserById ¶
func GetUserById(userID string, userContext ...supertokens.UserContext) (*tplmodels.User, error)
func GetUserByPhoneNumber ¶
func GetUserByPhoneNumber(tenantId string, phoneNumber string, userContext ...supertokens.UserContext) (*tplmodels.User, error)
func GetUserByThirdPartyInfo ¶
func GetUserByThirdPartyInfo(tenantId string, thirdPartyID string, thirdPartyUserID string, userContext ...supertokens.UserContext) (*tplmodels.User, error)
func GetUsersByEmail ¶
func GetUsersByEmail(tenantId string, email string, userContext ...supertokens.UserContext) ([]tplmodels.User, error)
func ListCodesByDeviceID ¶
func ListCodesByDeviceID(tenantId string, deviceID string, userContext ...supertokens.UserContext) (*plessmodels.DeviceType, error)
func ListCodesByEmail ¶
func ListCodesByEmail(tenantId string, email string, userContext ...supertokens.UserContext) ([]plessmodels.DeviceType, error)
func ListCodesByPhoneNumber ¶
func ListCodesByPhoneNumber(tenantId string, phoneNumber string, userContext ...supertokens.UserContext) ([]plessmodels.DeviceType, error)
func ListCodesByPreAuthSessionID ¶
func ListCodesByPreAuthSessionID(tenantId string, preAuthSessionID string, userContext ...supertokens.UserContext) (*plessmodels.DeviceType, error)
func MakeSMTPService ¶
func MakeSMTPService(config emaildelivery.SMTPServiceConfig) *emaildelivery.EmailDeliveryInterface
func MakeSupertokensSMSService ¶
func MakeSupertokensSMSService(apiKey string) *smsdelivery.SmsDeliveryInterface
func MakeTwilioService ¶
func MakeTwilioService(config smsdelivery.TwilioServiceConfig) (*smsdelivery.SmsDeliveryInterface, error)
func PasswordlessSignInUpByEmail ¶
func PasswordlessSignInUpByEmail(tenantId string, email string, userContext ...supertokens.UserContext) (struct { PreAuthSessionID string CreatedNewUser bool User tplmodels.User }, error)
func PasswordlessSignInUpByPhoneNumber ¶
func PasswordlessSignInUpByPhoneNumber(tenantId string, phoneNumber string, userContext ...supertokens.UserContext) (struct { PreAuthSessionID string CreatedNewUser bool User tplmodels.User }, error)
func ResetForTest ¶
func ResetForTest()
func RevokeAllCodesByEmail ¶
func RevokeAllCodesByEmail(tenantId string, email string, userContext ...supertokens.UserContext) error
func RevokeAllCodesByPhoneNumber ¶
func RevokeAllCodesByPhoneNumber(tenantId string, phoneNumber string, userContext ...supertokens.UserContext) error
func RevokeCode ¶
func RevokeCode(tenantId string, codeID string, userContext ...supertokens.UserContext) error
func SendEmail ¶
func SendEmail(input emaildelivery.EmailType, userContext ...supertokens.UserContext) error
func SendSms ¶
func SendSms(input smsdelivery.SmsType, userContext ...supertokens.UserContext) error
func ThirdPartyGetProvider ¶
func ThirdPartyGetProvider(tenantId string, thirdPartyID string, clientType *string, userContext ...supertokens.UserContext) (*tpmodels.TypeProvider, error)
func ThirdPartyManuallyCreateOrUpdateUser ¶
func ThirdPartyManuallyCreateOrUpdateUser(tenantId string, thirdPartyID string, thirdPartyUserID string, email string, userContext ...supertokens.UserContext) (tplmodels.ManuallyCreateOrUpdateUserResponse, error)
func UpdatePasswordlessUser ¶
func UpdatePasswordlessUser(userID string, email *string, phoneNumber *string, userContext ...supertokens.UserContext) (plessmodels.UpdateUserResponse, error)
Types ¶
type Recipe ¶
type Recipe struct { RecipeModule supertokens.RecipeModule Config tplmodels.TypeNormalisedInput RecipeImpl tplmodels.RecipeInterface APIImpl tplmodels.APIInterface EmailDelivery emaildelivery.Ingredient SmsDelivery smsdelivery.Ingredient // contains filtered or unexported fields }
func GetRecipeInstance ¶
func GetRecipeInstance() *Recipe
func MakeRecipe ¶
func MakeRecipe(recipeId string, appInfo supertokens.NormalisedAppinfo, config tplmodels.TypeInput, thirdPartyInstance *thirdparty.Recipe, passwordlessInstance *passwordless.Recipe, emailDeliveryIngredient *emaildelivery.Ingredient, smsDeliveryIngredient *smsdelivery.Ingredient, onSuperTokensAPIError func(err error, req *http.Request, res http.ResponseWriter)) (Recipe, error)
Click to show internal directories.
Click to hide internal directories.