SDK
SDK Javascript v7.x
2

logout #

Revokes the current authentication token.

If there were any, real-time subscriptions are cancelled.

If this action is successful, then the jwt property of this class instance is unset.


logout();

Usage #

const credentials = { username: 'foo', password: 'bar' };
try {
  await kuzzle.auth.login('local', credentials);
  await kuzzle.auth.logout();
  console.log('Success');
} catch (error) {
  console.error(error.message);
}