getAccount method
Returns the possible MicrosoftAccount associated with a session.
Implementation
Future<MicrosoftAccount?> getAccount(Session session) {
return switch (session.authenticated) {
null => Future.value(null),
_ => MicrosoftAccount.db.findFirstRow(
session,
where: (t) => t.authUserId.equals(
session.authenticated!.authUserId,
),
),
};
}