authenticate static method

Future<AuthenticateResponse> authenticate(
  1. String url,
  2. String credentialId
)

Authenticate a user.

url URL used to authenticate credentialId The ID of the credential with which to authenticate. Returns a AuthenticateResponse or throws an Exception

Implementation

static Future<AuthenticateResponse> authenticate(String url, String credentialId) async {
  final Map<String, dynamic>? authenticateResponse =
      await _channel.invokeMapMethod('authenticate', {
    'url': url,
    'credentialId': credentialId,
  });

  try {
    return AuthenticateResponse(
      redirectUrl: authenticateResponse?["redirectUrl"],
      message: authenticateResponse?["message"],
    );
  } on Exception {
    rethrow;
  }
}