According to the JS Auth documentation on the Firebase website, it only shows how to get the displayName and how to update displayName. So I tried to update it. But
I could´t use ({displayName: name}) directly (sintaxe error in editor). Then, I found another way:
({displayName: name})
UserUpdateInfo updateInfo = UserUpdateInfo(); updateInfo.displayName = name; result.user.updateProfile(updateInfo);
This is in Dart (I am using Firebase with Flutter).