login method
Attempts to login a user with a passkey.
Parameters:
identifier
: Email address or phone for the user (optional).
Returns:
A Future<AuthResult>
object that includes a redirect URL and saves the
authorization token and (optional) refresh token securely to the device.
Throws:
A PassageError
in cases such as:
- User cancels the operation
- User does not exist
- App configuration was not done properly
- etc.
Implementation
Future<AuthResult> login([String? identifier]) {
return PassageFlutterPlatform.instance.loginWithPasskey(identifier);
}