authenticate #
Authenticate the SDK by using the function set in the authenticator property.
Arguments #
authenticate();
Usage #
kuzzle.authenticator = async () => {
await kuzzle.auth.login('local', { username: 'foo', password: 'bar' });
};
try {
await kuzzle.authenticate();
console.log('Success');
} catch (error) {
console.error(error.message);
}
Edit this page on Github(opens new window)