login static method

Future<void> login({
  1. required Function onSuccess,
  2. required dynamic onFailure(
    1. String
    ),
})

Login the user

Implementation

static Future<void> login(
    {required Function onSuccess,
    required Function(String) onFailure}) async {
  Uri? url = await getLoginUrl(onSuccess: onSuccess, onFailure: onFailure);
  if (url != null) {
    await createServer(url.toString(), _updateAuthData);
    wtLog.updateSpinnerMessage('Logged-in successfully!');
  } else {
    wtLog.stopSpinner();
    wtLog.error('Failed to get login url');
  }
}