getMagicLinkStatus method

  1. @override
Future<AuthResult?> getMagicLinkStatus(
  1. String magicLinkId
)
override

Implementation

@override
Future<AuthResult?> getMagicLinkStatus(String magicLinkId) async {
  try {
    final resultPromise = passage.getMagicLinkStatus(magicLinkId);
    final jsObject = await js_util.promiseToFuture(resultPromise);
    return jsObject == null ? null : AuthResult.fromJson(jsObject);
  } catch (e) {
    throw PassageError.fromObject(
        object: e, overrideCode: PassageErrorCode.magicLinkError);
  }
}