SDK
SDK Dart Null Safety v3.x
2

CredentialsExist #

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

Arguments #

Copied to clipboard!
Future<bool> credentialsExist(String strategy)
Argument Type Description
strategy
String
Strategy to use

Return #

A boolean indicating if credentials exist for the strategy.

Usage #

Copied to clipboard!
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');
  }