This SDK documentation is outdated. Please do not refer to it, and instead visit the User Guides section.

Skip to main content
Version: 6.1.X

init

ThirdPartyEmailPassword.init({
signUpFeature?: {
formFields?: {
id: string,
validate?: (value: any) => Promise<string | undefined>,
optional?: boolean,
}[],
},
providers?: TypeProvider[],
resetPasswordUsingTokenFeature?: {
getResetPasswordURL?: (user: User) => Promise<string>,
createAndSendCustomEmail?: (user: User, passwordResetURLWithToken: string) => Promise<void>
},
emailVerificationFeature: {
getEmailVerificationURL?: (user: User) => Promise<string>,
createAndSendCustomEmail?: (user: User, emailVerificationURLWithToken: string) => Promise<void>,
},
override?: {
functions?: function,
apis?: function
},
})

type User = {
id: string,
timeJoined: number,
email: string,
thirdParty: { // will be undefined if this user signed up with email / password
id: string,
userId: string
} | undefined
}

Parameters#

signUpFeature#

  • formFields (Optional)
    • id
      • Id for the custom form field.
    • validate (Optional)
      • Custom validator for form field entry.
      • Default: undefined (No validation)
    • optional (Optional)
      • Set the custom field to be optional or not.
      • Default: false

providers#

  • Object to initialize a thirdparty provider supported by the backend.
  • Default: empty

resetPasswordUsingTokenFeature#

  • getResetPasswordURL (Optional)
    • Implement this to provide a custom reset password URL
    • Default: {websiteDomain}{websiteBasePath}/auth/reset-password
  • createAndSendCustomEmail (Optional)
    • Callback for creating and sending custom emails for password reset.
    • Default: Uses our APIs to send a password reset email.

emailVerificationFeature#

  • getEmailVerificationURL (Optional)
    • Implement this to provide a custom email verification URL
    • Default: {websiteDomain}{websiteBasePath}/auth/verify-email
  • createAndSendCustomEmail (Optional)
    • Callback for creating and sending custom emails for email verification.
    • Default: Uses our APIs to send an email verification email.

override (Optional)#

  • Use this feature to override how this recipe behaves
  • Default: undefined
Looking for older versions of the documentation?
Which UI do you use?
Custom UI
Pre built UI