magicLinkActivate method

  1. @override
Future<AuthResult> magicLinkActivate(
  1. String magicLink
)
override

Implementation

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