status method

Future<AuthResult> status(
  1. String id
)

Looks up a magic link by ID and checks if it has been verified. This function is most commonly used to iteratively check if a user has clicked a magic link to login. Once the link has been verified, Passage will return authentication information via this function. This enables cross-device login.

Parameters:

  • id: The magic link ID.

Returns: A Future<AuthResult?> object that includes a redirect URL and saves the authorization token and (optional) refresh token securely to the device, or null if the magic link has not been verified.

Throws: PassageError

Implementation

Future<AuthResult> status(String id) {
  return PassageFlutterPlatform.instance.getMagicLinkStatus(id);
}