Documentation ¶
Index ¶
- Constants
- Variables
- func AfterEach()
- func BeforeEach()
- func ConsumeCodeWithLinkCode(tenantId string, linkCode string, preAuthSessionID string, ...) (plessmodels.ConsumeCodeResponse, error)
- func ConsumeCodeWithUserInputCode(tenantId string, deviceID string, userInputCode string, ...) (plessmodels.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 DefaultCreateAndSendCustomEmail(appInfo supertokens.NormalisedAppinfo) func(email string, userInputCode *string, urlWithLinkCode *string, ...) error
- func DefaultCreateAndSendCustomTextMessage(appInfo supertokens.NormalisedAppinfo) ...
- func DefaultValidateEmailAddress(value interface{}, tenantId string) *string
- func DefaultValidatePhoneNumber(value interface{}, tenantId string) *string
- func DeleteEmailForUser(userID string, userContext ...supertokens.UserContext) (plessmodels.DeleteUserResponse, error)
- func DeletePhoneNumberForUser(userID string, userContext ...supertokens.UserContext) (plessmodels.DeleteUserResponse, error)
- func GetUserByEmail(tenantId string, email string, userContext ...supertokens.UserContext) (*plessmodels.User, error)
- func GetUserByID(userID string, userContext ...supertokens.UserContext) (*plessmodels.User, error)
- func GetUserByPhoneNumber(tenantId string, phoneNumber string, userContext ...supertokens.UserContext) (*plessmodels.User, error)
- func Init(config plessmodels.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 MakeRecipeImplementation(querier supertokens.Querier) plessmodels.RecipeInterface
- func MakeSMTPService(config emaildelivery.SMTPServiceConfig) *emaildelivery.EmailDeliveryInterface
- func MakeSupertokensSMSService(apiKey string) *smsdelivery.SmsDeliveryInterface
- func MakeTwilioService(config smsdelivery.TwilioServiceConfig) (*smsdelivery.SmsDeliveryInterface, error)
- 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 SignInUpByEmail(tenantId string, email string, userContext ...supertokens.UserContext) (struct{ ... }, error)
- func SignInUpByPhoneNumber(tenantId string, phoneNumber string, userContext ...supertokens.UserContext) (struct{ ... }, error)
- func UpdateUser(userID string, email *string, phoneNumber *string, ...) (plessmodels.UpdateUserResponse, error)
- type Recipe
Constants ¶
View Source
const RECIPE_ID = "passwordless"
Variables ¶
View Source
var PasswordlessLoginEmailDataForTest struct { Email string UserInputCode *string UrlWithLinkCode *string CodeLifetime uint64 PreAuthSessionId string UserContext supertokens.UserContext }
View Source
var PasswordlessLoginEmailSentForTest bool = false
View Source
var PasswordlessLoginSmsDataForTest struct { Phone string UserInputCode *string UrlWithLinkCode *string CodeLifetime uint64 PreAuthSessionId string UserContext supertokens.UserContext }
View Source
var PasswordlessLoginSmsSentForTest bool = false
Functions ¶
func BeforeEach ¶ added in v0.5.7
func BeforeEach()
func ConsumeCodeWithLinkCode ¶
func ConsumeCodeWithLinkCode(tenantId string, linkCode string, preAuthSessionID string, userContext ...supertokens.UserContext) (plessmodels.ConsumeCodeResponse, error)
func ConsumeCodeWithUserInputCode ¶
func ConsumeCodeWithUserInputCode(tenantId string, deviceID string, userInputCode string, preAuthSessionID string, userContext ...supertokens.UserContext) (plessmodels.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 DefaultCreateAndSendCustomEmail ¶ added in v0.6.8
func DefaultCreateAndSendCustomEmail(appInfo supertokens.NormalisedAppinfo) func(email string, userInputCode *string, urlWithLinkCode *string, codeLifetime uint64, preAuthSessionId string, userContext supertokens.UserContext) error
func DefaultCreateAndSendCustomTextMessage ¶ added in v0.6.8
func DefaultCreateAndSendCustomTextMessage(appInfo supertokens.NormalisedAppinfo) func(phoneNumber string, userInputCode *string, urlWithLinkCode *string, codeLifetime uint64, preAuthSessionId string, userContext supertokens.UserContext) error
func DefaultValidateEmailAddress ¶ added in v0.9.9
func DefaultValidatePhoneNumber ¶ added in v0.9.9
func DeleteEmailForUser ¶ added in v0.5.7
func DeleteEmailForUser(userID string, userContext ...supertokens.UserContext) (plessmodels.DeleteUserResponse, error)
func DeletePhoneNumberForUser ¶ added in v0.5.7
func DeletePhoneNumberForUser(userID string, userContext ...supertokens.UserContext) (plessmodels.DeleteUserResponse, error)
func GetUserByEmail ¶
func GetUserByEmail(tenantId string, email string, userContext ...supertokens.UserContext) (*plessmodels.User, error)
func GetUserByID ¶
func GetUserByID(userID string, userContext ...supertokens.UserContext) (*plessmodels.User, error)
func GetUserByPhoneNumber ¶
func GetUserByPhoneNumber(tenantId string, phoneNumber string, userContext ...supertokens.UserContext) (*plessmodels.User, error)
func Init ¶
func Init(config plessmodels.TypeInput) supertokens.Recipe
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 MakeRecipeImplementation ¶ added in v0.5.2
func MakeRecipeImplementation(querier supertokens.Querier) plessmodels.RecipeInterface
func MakeSMTPService ¶ added in v0.7.0
func MakeSMTPService(config emaildelivery.SMTPServiceConfig) *emaildelivery.EmailDeliveryInterface
func MakeSupertokensSMSService ¶ added in v0.7.0
func MakeSupertokensSMSService(apiKey string) *smsdelivery.SmsDeliveryInterface
func MakeTwilioService ¶ added in v0.7.0
func MakeTwilioService(config smsdelivery.TwilioServiceConfig) (*smsdelivery.SmsDeliveryInterface, error)
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 ¶ added in v0.6.8
func SendEmail(input emaildelivery.EmailType, userContext ...supertokens.UserContext) error
func SendSms ¶ added in v0.6.8
func SendSms(input smsdelivery.SmsType, userContext ...supertokens.UserContext) error
func SignInUpByEmail ¶
func SignInUpByEmail(tenantId string, email string, userContext ...supertokens.UserContext) (struct { PreAuthSessionID string CreatedNewUser bool User plessmodels.User }, error)
func SignInUpByPhoneNumber ¶
func SignInUpByPhoneNumber(tenantId string, phoneNumber string, userContext ...supertokens.UserContext) (struct { PreAuthSessionID string CreatedNewUser bool User plessmodels.User }, error)
func UpdateUser ¶
func UpdateUser(userID string, email *string, phoneNumber *string, userContext ...supertokens.UserContext) (plessmodels.UpdateUserResponse, error)
Types ¶
type Recipe ¶
type Recipe struct { RecipeModule supertokens.RecipeModule Config plessmodels.TypeNormalisedInput RecipeImpl plessmodels.RecipeInterface APIImpl plessmodels.APIInterface EmailDelivery emaildelivery.Ingredient SmsDelivery smsdelivery.Ingredient }
func GetRecipeInstance ¶ added in v0.9.9
func GetRecipeInstance() *Recipe
func GetRecipeInstanceOrThrowError ¶ added in v0.9.14
func MakeRecipe ¶
func MakeRecipe(recipeId string, appInfo supertokens.NormalisedAppinfo, config plessmodels.TypeInput, emailDeliveryIngredient *emaildelivery.Ingredient, smsDeliveryIngredient *smsdelivery.Ingredient, onSuperTokensAPIError func(err error, req *http.Request, res http.ResponseWriter)) (Recipe, error)
func (*Recipe) CreateMagicLink ¶ added in v0.5.2
func (r *Recipe) CreateMagicLink(email *string, phoneNumber *string, tenantId string, userContext supertokens.UserContext) (string, error)
func (*Recipe) SignInUp ¶ added in v0.5.2
func (r *Recipe) SignInUp(email *string, phoneNumber *string, tenantId string, userContext supertokens.UserContext) (struct { PreAuthSessionID string CreatedNewUser bool User plessmodels.User }, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.