SDK
SDK Javascript v7.x
2

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);
}