findUserByIdentifier static method

Future<UserInfo?> findUserByIdentifier(
  1. Session session,
  2. String identifier
)

Finds a user by its sign in identifier. For Google sign ins, this is the email address. For Apple sign ins, this is a unique identifying string. Returns null if no user is found.

Implementation

static Future<UserInfo?> findUserByIdentifier(
    Session session, String identifier) async {
  return await session.db.findSingleRow<UserInfo>(
    where: UserInfo.t.userIdentifier.equals(identifier),
  );
}