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 UserInfo.db.findFirstRow(
    session,
    where: (t) => t.userIdentifier.equals(identifier),
  );
}