authenticateApple method
Implementation
@override
Future<model.Session> authenticateApple({
required String token,
bool create = true,
String? username,
Map<String, String>? vars,
}) async {
final res = await _api.v2AccountAuthenticateApplePost(
body: ApiAccountApple(
token: token,
vars: vars,
),
create: create,
username: username,
);
if (res.body == null) {
throw Exception('Authentication failed.');
}
final data = res.body!;
return model.Session.fromApi(data);
}