showPasswordless
client.showPasswordless({ container: HTMLElement|id, // Optional arguments authType: string, showSocialLogins: boolean, socialProviders: string[], showIntro: boolean, countryCode: string, auth: object, onReady: function, theme: object, i18n: object, recaptcha_enabled: boolean, recaptcha_site_key: string, phoneNumberOptions: object })
Examples
client.showPasswordless({
container: 'passwordless-container',
showSocialLogins: true,
socialProviders: ['facebook', 'google'],
auth: {
redirectUri: 'http://localhost:3000/local-sandbox/auth-callback'
},
onReady: instance => {
// Destroy the widget
// if (...) instance.destroy()
},
theme: {
primaryColor: '#274890',
borderRadius: '25',
socialButton: {
inline: true
}
},
i18n: {
'passwordless.intro': 'Enter your email to sign in.'
}
})
client.showPasswordless({
container: 'passwordless-container',
showSocialLogins: true,
socialProviders: ['facebook', 'google'],
authType: 'sms',
countryCode: 'US',
onReady: instance => {
// Destroy the widget
// if (...) instance.destroy()
},
theme: {
primaryColor: '#274890',
borderRadius: '25',
socialButton: {
inline: true
}
},
i18n: {
'passwordless.sms.intro': 'Enter your phone number to sign in.',
}
})
Parameters
The DOM element or the |
|||||||||||||||||||||||||||||||||
The passwordless auth type ( Defaults to |
|||||||||||||||||||||||||||||||||
Show the social login buttons. Defaults to |
|||||||||||||||||||||||||||||||||
Lists the available social providers. This is an array of strings. If you pass an empty array, social providers are not displayed. You can also specify variants for a provider as a key:value pair:
|
|||||||||||||||||||||||||||||||||
Show the introduction text. Defaults to |
|||||||||||||||||||||||||||||||||
The ISO country code useful to format phone numbers. Defaults to the predefined country code in your account settings or |
|||||||||||||||||||||||||||||||||
List of authentication options
|
|||||||||||||||||||||||||||||||||
Callback function called after the widget has been successfully loaded and rendered inside the container. The callback is called with the widget instance. |
|||||||||||||||||||||||||||||||||
The options to set up to customize the appearance of the widget. Below is an example of some of the theme attributes. For a full list, see theme attributes.
|
|||||||||||||||||||||||||||||||||
Widget labels and error messages to override. Falls back to the default wordings in
|
|||||||||||||||||||||||||||||||||
Boolean that specifies whether reCAPTCHA is enabled or not. |
|||||||||||||||||||||||||||||||||
The SITE key that comes from your reCAPTCHA setup. This must be paired with the appropriate secret key that you received when setting up reCAPTCHA. |
|||||||||||||||||||||||||||||||||
Object that lets you set display options for the phone number field. Options
|
theme
attributes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|