showEmailEditor
client.showEmailEditor({ container: HTMLElement|id, accessToken: string, // Optional arguments showLabels: boolean, redirectUrl: boolean, onReady: function, theme: object, i18n: object, })
Description
Show the widget for the current profile to change their email after authentication.
For more on updating emails, see our Email address management page. |
|
Examples
const accessToken = // Here paste the authorization token of the profile retrieved after login
client.showEmailEditor({
container: 'email-editor-container',
accessToken,
showLabels: true,
redirectUrl: 'https://example.com/profile-editor',
onReady: instance => {
// Destroy the widget
// if (...) instance.destroy()
},
theme: {
primaryColor: '#274890',
borderRadius: '#374890'
},
i18n: {
'emailEditor.successMessage': 'Please check now your mailbox to confirm your new email address.'
}
})
Parameters
Parameters | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
The DOM element or the |
|||||||||
The authorization credential JSON Web Token (JWT) used to access the ReachFive API, less than five minutes old. |
|||||||||
Widget labels and error messages to override. Falls back to the default wordings in
|
|||||||||
Callback function called after the widget has been successfully loaded and rendered inside the container. The callback is called with the widget instance. |
|||||||||
The URL sent in the email to which the user is redirected. This URL must be whitelisted in the |
|||||||||
Boolean for whether the signup form fields' labels are displayed on the login view. Defaults to |
|||||||||
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.
|
theme
attributes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|