findUserAuthentication method

Future<UserAuthentication?> findUserAuthentication(
  1. UserModel model
)

Finds the UserAuthentication for the given model if it exists in authenticationDatabase

Implementation

Future<UserAuthentication?> findUserAuthentication(UserModel model) async {
  if (model.id == null) {
    throw const UserModelIDException();
  }
  final authenticationId = (UserAuthentication()..userId = model.id).id!;
  return await _specificDatabase.findModel(authenticationId);
}