Constructor
new DatabaseAuthenticator(options, oauth)
- Source:
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object
|
Authenticator options.
|
||||||||||||
oauth |
OAuthAuthenticator
|
OAuthAuthenticator instance. |
Members
(inner) clientOptions :Object
Options object for the Rest Client instace.
- Source:
Type:
-
Object
Methods
changePassword(data, cbopt) → {Promise|undefined}
Change password using a database or active directory service.
- Source:
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object
|
User credentials object.
|
|||||||||||||
cb |
function
|
<optional> |
Method callback. |
Returns:
- Type:
-
Promise
|undefined
Example
requestChangePasswordEmail(data, cbopt) → {Promise|undefined}
Request a change password email using a database or active directory service.
- Source:
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object
|
User credentials object.
|
||||||||||
cb |
function
|
<optional> |
Method callback. |
Returns:
- Type:
-
Promise
|undefined
Example
signIn(data, cbopt) → {Promise|undefined}
Sign in using a database or active directory service.
- Source:
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object
|
User credentials object.
|
|||||||||||||
cb |
function
|
<optional> |
Method callback. |
Returns:
- Type:
-
Promise
|undefined
Example
var data = {
username: '{USERNAME}',
password: '{PASSWORD}',
connection: 'Username-Password-Authentication' // Optional field.
};
auth0.database.signIn(data, function (err, userData) {
if (err) {
// Handle error.
}
console.log(userData);
});
signUp(data, cbopt) → {Promise|undefined}
Sign up using a database or active directory service.
- Source:
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object
|
User credentials object.
|
|||||||||||||
cb |
function
|
<optional> |
Method callback. |
Returns:
- Type:
-
Promise
|undefined
Example
var data = {
email: '{EMAIL}',
password: '{PASSWORD}',
connection: 'Username-Password-Authentication' // Optional field.
};
auth0.database.signUp(data, function (err, userData) {
if (err) {
// Handle error.
}
console.log(userData);
});