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

Skip to main content
Version: 7.1.X

init

ThirdParty.init({
signInAndUpFeature: {
providers: TypeProvider[]
},
emailVerificationFeature?: {
getEmailVerificationURL?: (user: User) => Promise<string>,
createAndSendCustomEmail?: (user: User, emailVerificationURLWithToken: string) => Promise<void>,
},
override?: {
functions?: function,
apis?: function
}
})

type User = {
// this is the SuperTokens' userId of this user.
id: string,
timeJoined: number,
email: string,
thirdParty: {
id: string, // For ex: "google", "facebook", "github" etc..
// this is the userID of this user as given by the third party provider
userId: string
}
}

Parameters#

signInUpFeature (Optional)#

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

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#

  • 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