manualLogin static method

Future<List<Object?>> manualLogin(
  1. Uri uri,
  2. bool isLocal,
  3. String backendCanisterId,
  4. Service idlService,
)

Implementation

static Future<List<Object?>> manualLogin(Uri uri, bool isLocal,
    String backendCanisterId, Service idlService) async {
  List<dynamic> result = await AuthLogIn.fetchAgent(
      uri.queryParameters, isLocal, backendCanisterId, idlService);
  if (result.isNotEmpty) {
    bool isLoggedIn = uri.queryParameters['status'] == "true" ? true : false;
    _principalId = result[0].toString();
    return [isLoggedIn, _principalId];
  } else {
    return [false, "Log in to see your principal"];
  }
}