У меня есть вопрос относительно Google Play Games v2 SDK. Я пытаюсь интегрировать игры Google Play с PlayFab, но когда я нажимаю кнопку для подключения, я продолжаю получать эту ошибку: «Google Play Auth Ошибка: отменена». Я получил API из Play Console и вставил его в настройку. Проблема может быть в моем коде. Может ли быть так, что он не работает во время закрытого тестирования или с APK, сгенерированными между ПК и мобильным устройством?This is the code:
using UnityEngine;
using PlayFab;
using PlayFab.ClientModels;
using GooglePlayGames;
using GooglePlayGames.BasicApi;
using static Popup;
using TMPro;
public class GooglePlayFabAuth : MonoBehaviour
{
public TMP_Text AuthStatus;
private void Start()
{
PlayGamesPlatform.Activate();
// Check authentication status at startup
if (PlayFabClientAPI.IsClientLoggedIn())
{
AuthStatus.text = “Authenticated”;
}
else
{
AuthStatus.text = “Not Authenticated”;
}
}
#region Google Link Process
public void StartGoogleLinkProcess()
{
// Step 1: Check if you are authenticated in PlayFab
if (!PlayFabClientAPI.IsClientLoggedIn())
{
Popup.Show(“You are not authenticated in PlayFab. Please log in before linking your account.”);
return;
}
// Step 2: Authenticate with Google Play Games
if (!PlayGamesPlatform.Instance.IsAuthenticated())
{
Debug.Log(“Starting authentication with Google Play Games…”);
AuthStatus.text = “Authenticating with Google…”;
// Change here:
PlayGamesPlatform.Instance.Authenticate((status) =>
{
if (status == SignInStatus.Success)
{
Debug.Log(“Google Play Games authentication successful.”);
// If authentication succeeds, continue with linking the PlayFab account
ContinueGoogleLinkProcess();
}
else
{
Debug.LogError("Google Play Games authentication failed. Status: " + status);
Popup.Show(“Google Play Games authentication failed.”);
AuthStatus.text = “Google Authentication Error”;
}
});
}
else
{
// If you are already authenticated with Google, go directly to the linking process
ContinueGoogleLinkProcess();
}
}
private void ContinueGoogleLinkProcess()
{
Debug.Log(“Starting Google account linking process…”);
AuthStatus.text = “Linking…”;
PlayGamesPlatform.Instance.RequestServerSideAccess(false, (string serverAuthCode) =>
{
if (!string.IsNullOrEmpty(serverAuthCode))
{
Debug.Log(“Server Auth Code obtained.”);
Popup.Show(“Linking account…”);
LinkGoogleAccount(serverAuthCode);
}
else
{
Debug.LogError(“Could not obtain Server Auth Code.”);
Popup.Show(“Error obtaining Google authentication code.”);
AuthStatus.text = “Error”;
}
});
}
private void LinkGoogleAccount(string serverAuthCode)
{
var request = new LinkGoogleAccountRequest
{
ServerAuthCode = serverAuthCode,
ForceLink = false,
};
PlayFabClientAPI.LinkGoogleAccount(request, OnGoogleLinkSuccess, OnPlayFabError);
}
#endregion
#region Callbacks
private void OnGoogleLinkSuccess(LinkGoogleAccountResult result)
{
Debug.Log(“Google account successfully linked to PlayFab account!”);
AuthStatus.text = “Authenticated with Google”;
Popup.Show(“Google account successfully linked!”);
}
private void OnPlayFabError(PlayFabError error)
{
Debug.LogError("PlayFab Error: " + error.GenerateErrorReport());
AuthStatus.text = error.GenerateErrorReport();
Popup.Show(error.GenerateErrorReport());
if (error.Error == PlayFabErrorCode.LinkedAccountAlreadyClaimed)
{
Debug.LogError(“This Google account is already linked to another PlayFab account.”);
Popup.Show(“This Google account is already linked to another PlayFab account.”);
}
else
{
Popup.Show("Error: " + error.GenerateErrorReport());
}
}
#endregion
}
< /code>
Это Android logcat erros: < /p>
2025.09.11 21: 30: 02.137 6627 6691 Ошибка Unity Autentiforce Google Play Games. Статус: отменен < /li>
2025.09.11 21: 30: 02.137 6627 6691 Ошибка Unity GooglePlayfabauth: B__2_0 (SigninStatus) < /li>
2025.09.11 21: 30: 02.137 6627 6691. Googleplaygames.ourutils.playgameshelperobject: update () < /li>
< /ol>
Я пытаюсь сделать работу по вовлечению Google.
Я протестировал приложение на консоли Play (закрытое тестирование).
API-интерфейс из Play Console (идентификатор клиента и ресурс), а OATH SENCEUTH уже есть. Приложение.
Я застрял в статусе входа в Google: отменен. < /p>
Подробнее здесь: https://stackoverflow.com/questions/797 ... s-canceled
Вопрос о Google аутентификации v2. Статус: отменен ⇐ Android
Форум для тех, кто программирует под Android
-
Anonymous
1758114345
Anonymous
У меня есть вопрос относительно Google Play Games v2 SDK. Я пытаюсь интегрировать игры Google Play с PlayFab, но когда я нажимаю кнопку для подключения, я продолжаю получать эту ошибку: «Google Play Auth Ошибка: отменена». Я получил API из Play Console и вставил его в настройку. Проблема может быть в моем коде. Может ли быть так, что он не работает во время закрытого тестирования или с APK, сгенерированными между ПК и мобильным устройством?This is the code:
using UnityEngine;
using PlayFab;
using PlayFab.ClientModels;
using GooglePlayGames;
using GooglePlayGames.BasicApi;
using static Popup;
using TMPro;
public class GooglePlayFabAuth : MonoBehaviour
{
public TMP_Text AuthStatus;
private void Start()
{
PlayGamesPlatform.Activate();
// Check authentication status at startup
if (PlayFabClientAPI.IsClientLoggedIn())
{
AuthStatus.text = “Authenticated”;
}
else
{
AuthStatus.text = “Not Authenticated”;
}
}
#region Google Link Process
public void StartGoogleLinkProcess()
{
// Step 1: Check if you are authenticated in PlayFab
if (!PlayFabClientAPI.IsClientLoggedIn())
{
Popup.Show(“You are not authenticated in PlayFab. Please log in before linking your account.”);
return;
}
// Step 2: Authenticate with Google Play Games
if (!PlayGamesPlatform.Instance.IsAuthenticated())
{
Debug.Log(“Starting authentication with Google Play Games…”);
AuthStatus.text = “Authenticating with Google…”;
// Change here:
PlayGamesPlatform.Instance.Authenticate((status) =>
{
if (status == SignInStatus.Success)
{
Debug.Log(“Google Play Games authentication successful.”);
// If authentication succeeds, continue with linking the PlayFab account
ContinueGoogleLinkProcess();
}
else
{
Debug.LogError("Google Play Games authentication failed. Status: " + status);
Popup.Show(“Google Play Games authentication failed.”);
AuthStatus.text = “Google Authentication Error”;
}
});
}
else
{
// If you are already authenticated with Google, go directly to the linking process
ContinueGoogleLinkProcess();
}
}
private void ContinueGoogleLinkProcess()
{
Debug.Log(“Starting Google account linking process…”);
AuthStatus.text = “Linking…”;
PlayGamesPlatform.Instance.RequestServerSideAccess(false, (string serverAuthCode) =>
{
if (!string.IsNullOrEmpty(serverAuthCode))
{
Debug.Log(“Server Auth Code obtained.”);
Popup.Show(“Linking account…”);
LinkGoogleAccount(serverAuthCode);
}
else
{
Debug.LogError(“Could not obtain Server Auth Code.”);
Popup.Show(“Error obtaining Google authentication code.”);
AuthStatus.text = “Error”;
}
});
}
private void LinkGoogleAccount(string serverAuthCode)
{
var request = new LinkGoogleAccountRequest
{
ServerAuthCode = serverAuthCode,
ForceLink = false,
};
PlayFabClientAPI.LinkGoogleAccount(request, OnGoogleLinkSuccess, OnPlayFabError);
}
#endregion
#region Callbacks
private void OnGoogleLinkSuccess(LinkGoogleAccountResult result)
{
Debug.Log(“Google account successfully linked to PlayFab account!”);
AuthStatus.text = “Authenticated with Google”;
Popup.Show(“Google account successfully linked!”);
}
private void OnPlayFabError(PlayFabError error)
{
Debug.LogError("PlayFab Error: " + error.GenerateErrorReport());
AuthStatus.text = error.GenerateErrorReport();
Popup.Show(error.GenerateErrorReport());
if (error.Error == PlayFabErrorCode.LinkedAccountAlreadyClaimed)
{
Debug.LogError(“This Google account is already linked to another PlayFab account.”);
Popup.Show(“This Google account is already linked to another PlayFab account.”);
}
else
{
Popup.Show("Error: " + error.GenerateErrorReport());
}
}
#endregion
}
< /code>
Это Android logcat erros: < /p>
2025.09.11 21: 30: 02.137 6627 6691 Ошибка Unity Autentiforce Google Play Games. Статус: отменен < /li>
2025.09.11 21: 30: 02.137 6627 6691 Ошибка Unity GooglePlayfabauth: B__2_0 (SigninStatus) < /li>
2025.09.11 21: 30: 02.137 6627 6691. Googleplaygames.ourutils.playgameshelperobject: update () < /li>
< /ol>
Я пытаюсь сделать работу по вовлечению Google.
Я протестировал приложение на консоли Play (закрытое тестирование).
API-интерфейс из Play Console (идентификатор клиента и ресурс), а OATH SENCEUTH уже есть. Приложение.
Я застрял в статусе входа в Google: отменен. < /p>
Подробнее здесь: [url]https://stackoverflow.com/questions/79763922/question-about-google-autentification-v2-status-canceled[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия