isAuthenticated method

Future<bool> isAuthenticated()

Implementation

Future<bool> isAuthenticated() async {
  final Database? database = await d2Instance.databaseInstance?.database;

  if (database == null) {
    return false;
  }

  final User? user = await d2Instance.userModule.user.getOne();

  return user?.isLoggedIn ?? false;
}