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 #

Copied to clipboard!
Future<Map<String, dynamic>> updateMyCredentials(
      String strategy, Map<String, dynamic> credentials)
Argument Type Description
strategy
String
Strategy to use
credentials
Map<String, dynamic>
Map representing the credentials

Return #

A Map representing the updated credentials with the following properties:

Property Type Description
username
String
The Username
kuid
String
The user's kuid

Usage #

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