These are the SDK reference docs. If you’re looking for docs to implement SuperTokens, you might want to check out the User Guides

Module recipe/thirdpartypasswordless

Index

References

Re-exports Apple
Renames and re-exports __type
Re-exports Facebook
Re-exports Github
Re-exports Google
Renames and re-exports __type

Type aliases

RecipeInterface: { clearLoginAttemptInfo: any; consumeCode: any; createCode: any; doesPasswordlessUserEmailExist: any; doesPasswordlessUserPhoneNumberExist: any; getOAuthAuthorisationURL: any; getOAuthState: any; getPasswordlessLoginAttemptInfo: any; redirectToThirdPartyLogin: any; resendCode: any; setOAuthState: any; setPasswordlessLoginAttemptInfo: any; thirdPartySignInAndUp: any }

Type declaration

  • clearLoginAttemptInfo:function
    • clearLoginAttemptInfo(): void | Promise<void>
  • consumeCode:function
    • consumeCode(input: ({ deviceId: string; preAuthSessionId: string; userInputCode: string } & { config: PasswordlessConfig }) | ({ linkCode: string; preAuthSessionId: string } & { config: PasswordlessConfig })): Promise<{ createdUser: boolean; status: "OK"; user: PasswordlessUser } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { message: string; status: "GENERAL_ERROR" } | { status: "RESTART_FLOW_ERROR" }>
    • Parameters

      • input: ({ deviceId: string; preAuthSessionId: string; userInputCode: string } & { config: PasswordlessConfig }) | ({ linkCode: string; preAuthSessionId: string } & { config: PasswordlessConfig })

      Returns Promise<{ createdUser: boolean; status: "OK"; user: PasswordlessUser } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { message: string; status: "GENERAL_ERROR" } | { status: "RESTART_FLOW_ERROR" }>

  • createCode:function
    • createCode(input: ({ email: string } & { config: PasswordlessConfig }) | ({ phoneNumber: string } & { config: PasswordlessConfig })): Promise<{ deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; preAuthSessionId: string; status: "OK" } | { message: string; status: "GENERAL_ERROR" }>
    • Parameters

      • input: ({ email: string } & { config: PasswordlessConfig }) | ({ phoneNumber: string } & { config: PasswordlessConfig })

      Returns Promise<{ deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; preAuthSessionId: string; status: "OK" } | { message: string; status: "GENERAL_ERROR" }>

  • doesPasswordlessUserEmailExist:function
    • doesPasswordlessUserEmailExist(input: { config: PasswordlessConfig; email: string }): Promise<boolean>
  • doesPasswordlessUserPhoneNumberExist:function
    • doesPasswordlessUserPhoneNumberExist(input: { config: PasswordlessConfig; phoneNumber: string }): Promise<boolean>
  • getOAuthAuthorisationURL:function
    • getOAuthAuthorisationURL(input: { config: TPConfig; thirdPartyId: string }): Promise<string>
  • getOAuthState:function
    • getOAuthState(): undefined | StateObject
  • getPasswordlessLoginAttemptInfo:function
    • getPasswordlessLoginAttemptInfo(): undefined | Promise<undefined | { contactInfo: string; contactMethod: "EMAIL" | "PHONE"; deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; lastResend: number; preAuthSessionId: string; redirectToPath?: string }> | { contactInfo: string; contactMethod: "EMAIL" | "PHONE"; deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; lastResend: number; preAuthSessionId: string; redirectToPath?: string }
    • Returns undefined | Promise<undefined | { contactInfo: string; contactMethod: "EMAIL" | "PHONE"; deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; lastResend: number; preAuthSessionId: string; redirectToPath?: string }> | { contactInfo: string; contactMethod: "EMAIL" | "PHONE"; deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; lastResend: number; preAuthSessionId: string; redirectToPath?: string }

  • redirectToThirdPartyLogin:function
    • redirectToThirdPartyLogin(input: { config: TPConfig; state?: StateObject; thirdPartyId: string }): Promise<{ status: "OK" | "ERROR" }>
    • Parameters

      • input: { config: TPConfig; state?: StateObject; thirdPartyId: string }
        • config: TPConfig
        • Optional state?: StateObject
        • thirdPartyId: string

      Returns Promise<{ status: "OK" | "ERROR" }>

  • resendCode:function
    • resendCode(input: { deviceId: string; preAuthSessionId: string } & { config: PasswordlessConfig }): Promise<{ status: "OK" | "RESTART_FLOW_ERROR" } | { message: string; status: "GENERAL_ERROR" }>
    • Parameters

      • input: { deviceId: string; preAuthSessionId: string } & { config: PasswordlessConfig }

      Returns Promise<{ status: "OK" | "RESTART_FLOW_ERROR" } | { message: string; status: "GENERAL_ERROR" }>

  • setOAuthState:function
    • setOAuthState(state: StateObject): void
  • setPasswordlessLoginAttemptInfo:function
    • setPasswordlessLoginAttemptInfo(input: { contactInfo: string; contactMethod: "EMAIL" | "PHONE"; deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; lastResend: number; preAuthSessionId: string; redirectToPath?: string }): void | Promise<void>
    • Parameters

      • input: { contactInfo: string; contactMethod: "EMAIL" | "PHONE"; deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; lastResend: number; preAuthSessionId: string; redirectToPath?: string }
        • contactInfo: string
        • contactMethod: "EMAIL" | "PHONE"
        • deviceId: string
        • flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"
        • lastResend: number
        • preAuthSessionId: string
        • Optional redirectToPath?: string

      Returns void | Promise<void>

  • thirdPartySignInAndUp:function
    • thirdPartySignInAndUp(input: { config: TPConfig; thirdPartyId: string }): Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" | "GENERAL_ERROR" } | { error: string; status: "FIELD_ERROR" }>
    • Parameters

      • input: { config: TPConfig; thirdPartyId: string }
        • config: TPConfig
        • thirdPartyId: string

      Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" | "GENERAL_ERROR" } | { error: string; status: "FIELD_ERROR" }>

UserInput: ({ contactMethod: "EMAIL"; signInUpFeature?: SignInUpFeatureConfigInput; validateEmailAddress?: any } | { contactMethod: "PHONE"; signInUpFeature?: SignInUpFeatureConfigInput & { defaultCountry?: CountryCode }; validatePhoneNumber?: any } | { contactMethod: "EMAIL_OR_PHONE"; signInUpFeature?: SignInUpFeatureConfigInput & { defaultCountry?: CountryCode; guessInternationPhoneNumberFromInputPhoneNumber?: any }; validateEmailAddress?: any; validatePhoneNumber?: any }) & { disablePasswordless?: boolean; linkClickedScreenFeature?: PasswordlessFeatureBaseConfig; oAuthCallbackScreen?: FeatureBaseConfig; override?: { components?: ComponentOverrideMap; functions?: any } & AuthRecipeUserInputOverride } & AuthRecipeModuleUserInput<GetRedirectionURLContext, PreAPIHookContext, OnHandleEventContext>

Variables

ThirdPartyPasswordlessAuth: React.FC<PropsWithChildren<{ requireAuth?: boolean; onSessionExpired?: any }>> = ...

Functions

  • EmailVerification(prop?: any): Element
  • PasswordlessLinkClicked(prop?: any): Element
  • SignInAndUp(prop?: any): Element
  • ThirdPartySignInAndUpCallback(prop?: any): Element
  • isEmailVerified(): Promise<boolean>
  • redirectToAuth(input?: "signin" | "signup" | { redirectBack?: false | true; show?: "signin" | "signup" }): Promise<void>
  • signOut(): Promise<void>

Generated using TypeDoc