authenticateApple method

  1. @override
Future<Session> authenticateApple({
  1. required String token,
  2. bool create = true,
  3. String? username,
  4. Map<String, String>? vars,
})
override

Implementation

@override
Future<model.Session> authenticateApple({
  required String token,
  bool create = true,
  String? username,
  Map<String, String>? vars,
}) async {
  final request = api.AuthenticateAppleRequest()
    ..create_2 = api.BoolValue(value: create)
    ..account = (api.AccountApple()
      ..token = token
      ..vars.addAll(vars ?? {}));

  if (username != null) {
    request.username = username;
  }

  final res = await _client.authenticateApple(request);

  return model.Session.fromDto(res);
}