fix: removed wrong code

This commit is contained in:
misha
2025-10-10 15:18:25 +03:00
parent 239ff675db
commit 21492a1ad9

View File

@@ -76,16 +76,7 @@ class SocialAuthFacade {
log(msg);
return null;
}
final response = await http.get(Uri.parse('https://id.vk.com/openapi/v1/phone_number'), headers: {'Authorization': 'Bearer ${auth.accessToken}'});
if (response.statusCode == 200) {
final json = jsonDecode(response.body);
final phone = json['phone_number'];
log(json.toString());
log('Phone: $phone');
} else {
log('VK phone request failed: ${response.statusCode} ${response.body}');
}
return AuthResultEntity(
accessToken: auth.accessToken,
refreshToken: auth.refreshToken,
@@ -211,7 +202,7 @@ class SocialAuthFacade {
try {
final controller = VkIDController(clID: int.parse(clientIdStr));
final authUri = controller.generateAuthorizeLinkWithCodeVerifier(provider: provider, scopes: [VkScope.phone, VkScope.email, VkScope.personalInfo]);
final authUri = controller.generateAuthorizeLinkWithCodeVerifier(provider: provider, scopes: [VkScope.phone, VkScope.email,]);
final codeVerifier = authUri.key;
final authUrl = authUri.value.toString();
final redirectScheme = 'vk$clientIdStr://';