SDK
SDK Dart v2.x
2

CredentialsExist #

Checks that the current user has credentials for the specified strategy.

Arguments #

Future<bool> credentialsExist(String strategy)
ArgumentTypeDescription
strategy
String
Strategy to use

Return #

A boolean indicating if credentials exist for the strategy.

Usage #

final result = await kuzzle
  .auth
  .login(
    'local',
    {
      'username': 'foo',
      'password': 'bar'
    },
  );
  final exists = await kuzzle
  .auth
  .credentialsExist(
    'local'
  );
  if (exists) {
    print('Credentials exists for local strategy');
  }