Пример #1
0
        public async Task <UserCredentials> CreateUserWithCredentials(string password = null)
        {
            var user = await CreateUserAsync().ConfigureAwait(false);

            var updatePasswordModel = new UpdatePasswordModel
            {
                Id = user.Id,
                CurrentPassword = NoPassword,
                NewPassword     = password ?? Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture)
            };
            await _userApi.UpdatePassword(user.Id, updatePasswordModel).ConfigureAwait(false);

            return(user.ToUserCredentials(updatePasswordModel.NewPassword));
        }