connectWithRedirect method

  1. @override
Future<EarthoCredentials?> connectWithRedirect(
  1. String accessId
)
override

Starts the access flow

accessId - which access the user should connect to take this value from creator.eartho.world

Implementation

@override
Future<EarthoCredentials?> connectWithRedirect(String accessId) async {
  if(earthoInstance == null)return null;
  final rawJson = await promiseToFuture(earthoInstance
      ?.connectWithRedirect(RedirectConnectOptions(access_id: accessId)));
  if (rawJson == null) return null;
  // final decodedJson = jsonDecode(rawJson);
  return EarthoCredentials.fromJSON(rawJson);
}