areSecurityChallengesNeeded function Null safety

Future<bool> areSecurityChallengesNeeded(
  1. String accessToken

Checks whether or not the user has to answer the security challenges. This will return true if the current location is not verified and needs to be verified using getSecurityChallenges and answerSecurityChallenges.


Future<bool> areSecurityChallengesNeeded(String accessToken) async {
  final headers = {
    'authorization': 'Bearer $accessToken',
  final response = await request(http.get, _mojangApi, 'user/security/location',
      headers: headers);
  return response.statusCode == 403;