getAuthToken method

  1. @override
Future<String?> getAuthToken()
override

Implementation

@override
Future<String?> getAuthToken() async {
  try {
    final resultPromise = passage.getCurrentSession().getAuthToken();
    final String? authToken = await js_util.promiseToFuture(resultPromise);
    return authToken;
  } catch (e) {
    var error = PassageError.fromObject(
        object: e, overrideCode: PassageErrorCode.tokenError);
    flutter.debugPrint(error.toString());
    return null;
  }
}