Documentation
¶
Index ¶
- Constants
- func ConsumeCodeWithLinkCode(linkCode string, preAuthSessionID string, userContext supertokens.UserContext) (plessmodels.ConsumeCodeResponse, error)
- func ConsumeCodeWithUserInputCode(deviceID string, userInputCode string, preAuthSessionID string, ...) (plessmodels.ConsumeCodeResponse, error)
- func CreateCodeWithEmail(email string, userInputCode *string, userContext supertokens.UserContext) (plessmodels.CreateCodeResponse, error)
- func CreateCodeWithPhoneNumber(phoneNumber string, userInputCode *string, userContext supertokens.UserContext) (plessmodels.CreateCodeResponse, error)
- func CreateMagicLinkByEmail(email string, userContext supertokens.UserContext) (string, error)
- func CreateMagicLinkByPhoneNumber(phoneNumber string, userContext supertokens.UserContext) (string, error)
- func CreateNewCodeForDevice(deviceID string, userInputCode *string, userContext supertokens.UserContext) (plessmodels.ResendCodeResponse, error)
- func GetUserByEmail(email string, userContext supertokens.UserContext) (*plessmodels.User, error)
- func GetUserByID(userID string, userContext supertokens.UserContext) (*plessmodels.User, error)
- func GetUserByPhoneNumber(phoneNumber string, userContext supertokens.UserContext) (*plessmodels.User, error)
- func Init(config plessmodels.TypeInput) supertokens.Recipe
- func ListCodesByDeviceID(deviceID string, userContext supertokens.UserContext) (*plessmodels.DeviceType, error)
- func ListCodesByEmail(email string, userContext supertokens.UserContext) ([]plessmodels.DeviceType, error)
- func ListCodesByPhoneNumber(phoneNumber string, userContext supertokens.UserContext) ([]plessmodels.DeviceType, error)
- func ListCodesByPreAuthSessionID(preAuthSessionID string, userContext supertokens.UserContext) (*plessmodels.DeviceType, error)
- func ResetForTest()
- func RevokeAllCodesByEmail(email string, userContext supertokens.UserContext) error
- func RevokeAllCodesByPhoneNumber(phoneNumber string, userContext supertokens.UserContext) error
- func RevokeCode(codeID string, userContext supertokens.UserContext) error
- func SignInUpByEmail(email string, userContext supertokens.UserContext) (struct{ ... }, error)
- func SignInUpByPhoneNumber(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 ¶
This section is empty.
Functions ¶
func ConsumeCodeWithLinkCode ¶
func ConsumeCodeWithLinkCode(linkCode string, preAuthSessionID string, userContext supertokens.UserContext) (plessmodels.ConsumeCodeResponse, error)
func ConsumeCodeWithUserInputCode ¶
func ConsumeCodeWithUserInputCode(deviceID string, userInputCode string, preAuthSessionID string, userContext supertokens.UserContext) (plessmodels.ConsumeCodeResponse, error)
func CreateCodeWithEmail ¶
func CreateCodeWithEmail(email string, userInputCode *string, userContext supertokens.UserContext) (plessmodels.CreateCodeResponse, error)
func CreateCodeWithPhoneNumber ¶
func CreateCodeWithPhoneNumber(phoneNumber string, userInputCode *string, userContext supertokens.UserContext) (plessmodels.CreateCodeResponse, error)
func CreateMagicLinkByEmail ¶
func CreateMagicLinkByEmail(email string, userContext supertokens.UserContext) (string, error)
func CreateMagicLinkByPhoneNumber ¶
func CreateMagicLinkByPhoneNumber(phoneNumber string, userContext supertokens.UserContext) (string, error)
func CreateNewCodeForDevice ¶
func CreateNewCodeForDevice(deviceID string, userInputCode *string, userContext supertokens.UserContext) (plessmodels.ResendCodeResponse, error)
func GetUserByEmail ¶
func GetUserByEmail(email string, userContext supertokens.UserContext) (*plessmodels.User, error)
func GetUserByID ¶
func GetUserByID(userID string, userContext supertokens.UserContext) (*plessmodels.User, error)
func GetUserByPhoneNumber ¶
func GetUserByPhoneNumber(phoneNumber string, userContext supertokens.UserContext) (*plessmodels.User, error)
func Init ¶
func Init(config plessmodels.TypeInput) supertokens.Recipe
func ListCodesByDeviceID ¶
func ListCodesByDeviceID(deviceID string, userContext supertokens.UserContext) (*plessmodels.DeviceType, error)
func ListCodesByEmail ¶
func ListCodesByEmail(email string, userContext supertokens.UserContext) ([]plessmodels.DeviceType, error)
func ListCodesByPhoneNumber ¶
func ListCodesByPhoneNumber(phoneNumber string, userContext supertokens.UserContext) ([]plessmodels.DeviceType, error)
func ListCodesByPreAuthSessionID ¶
func ListCodesByPreAuthSessionID(preAuthSessionID string, userContext supertokens.UserContext) (*plessmodels.DeviceType, error)
func ResetForTest ¶
func ResetForTest()
func RevokeAllCodesByEmail ¶
func RevokeAllCodesByEmail(email string, userContext supertokens.UserContext) error
func RevokeAllCodesByPhoneNumber ¶
func RevokeAllCodesByPhoneNumber(phoneNumber string, userContext supertokens.UserContext) error
func RevokeCode ¶
func RevokeCode(codeID string, userContext supertokens.UserContext) error
func SignInUpByEmail ¶
func SignInUpByEmail(email string, userContext supertokens.UserContext) (struct { PreAuthSessionID string CreatedNewUser bool User plessmodels.User }, error)
func SignInUpByPhoneNumber ¶
func SignInUpByPhoneNumber(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 }
func MakeRecipe ¶
func MakeRecipe(recipeId string, appInfo supertokens.NormalisedAppinfo, config plessmodels.TypeInput, onGeneralError func(err error, req *http.Request, res http.ResponseWriter)) (Recipe, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.