loginWithPassword
This SDK is deprecated in favor of the Core and UI JS SDKs. See Migrating to the latest SDKs to use the latest Core and UI SDKs.
Support for the Legacy JS SDK ends on 28 February, 2021. |
client.loginWithPassword({ email: string, phoneNumber: string, password: string, saveCredentials: boolean, auth: object, callback: function, })
About this command
Authenticate the user with the specified identifier (email or phoneNumber) and password.
Examples
// Login with an email
reach5('loginWithPassword', {
email: 'john.doe@example.com',
password: 'N5uiKvve',
auth: {
redirectUri: 'https://www.example.com/login/callback'
}
}, function (err) {
// Handle error
});
// Login with a phone number
reach5('loginWithPassword', {
phoneNumber: '+33606060606',
password: 'N5uiKvve',
auth: {
redirectUri: 'https://www.example.com/login/callback'
}
}, function (err) {
// Handle error
});
Parameters
User’s email |
|||||||||||||||||||||||||
User’s phone number. Both the international format and the national conventions of the account’s country are accepted if configured in account settings. |
|||||||||||||||||||||||||
User’s password. |
|||||||||||||||||||||||||
Store the user’s credentials with the Credentials Management API Defaults to false.
|
|||||||||||||||||||||||||
List of authentication options
|
|||||||||||||||||||||||||
Event callback that was used with on. |