login method

Future<MagicLink> login(
  1. String identifier, {
  2. String? language,
})

Creates and sends a new magic link for logging in.

Parameters:

  • identifier: The Passage User's identifier.
  • language: The language code for the magic link.

Returns: A Future<MagicLink> containing the magic link ID, which can be used to track the magic link's status using the getMagicLinkStatus method.

Throws: PassageError

Implementation

Future<MagicLink> login(String identifier, {String? language}) async {
  String magicLinkId = await PassageFlutterPlatform.instance.newLoginMagicLink(identifier);
  return MagicLink(magicLinkId);
}