SDK
SDK Dart Null Safety v3.x
2

UpdateMyCredentials #

Updates the current user's credentials for the specified strategy. The credentials to send will depend on the authentication plugin and the authentication strategy.

Arguments #

Future<Map<String, dynamic>> updateMyCredentials(
      String strategy, Map<String, dynamic> credentials)
ArgumentTypeDescription
strategy
String
Strategy to use
credentials
Map<String, dynamic>
Map representing the credentials

Return #

A Map representing the updated credentials with the following properties:

PropertyTypeDescription
username
String
The Username
kuid
String
The user's kuid

Usage #

await kuzzle
  .auth
  .login(
    'local',
    {
      'username': 'user',
      'password': 'bar'
    },
);
final result = await kuzzle
  .auth
  .updateMyCredentials(
    'local',
    {
      'username': 'user2',
      'password': 'bar2'
    }
);