saveUserAuthentication method
Saves a new UserAuthentication for the given model with basePassword
as the way to confirm it.
Implementation
Future<void> saveUserAuthentication(
UserModel model,
String basePassword,
) async {
if (model.id == null) {
throw const UserModelIDException();
}
final authentication = authenticationGenerator
.generateAuthentication(basePassword)
..userId = model.id;
await _specificDatabase.saveModel(authentication);
}