findUserByGoogleUserId method

Future<UuidValue?> findUserByGoogleUserId(
  1. Session session, {
  2. required String userIdentifier,
  3. Transaction? transaction,
})

Return the AuthUser id for the Google user id, if any.

Implementation

Future<UuidValue?> findUserByGoogleUserId(
  final Session session, {
  required final String userIdentifier,
  final Transaction? transaction,
}) async {
  final account = await GoogleAccount.db.findFirstRow(
    session,
    where: (final t) => t.userIdentifier.equals(userIdentifier),
    transaction: transaction,
  );

  return account?.authUserId;
}