GPGS 오류

문의를 남기실 경우 다음 항목을 작성해 주세요.
정보가 부족한 경우 확인 및 답변이 지연될 수 있습니다.

  • 뒤끝 SDK 버전 : 5.5.1
  • 프로젝트명 : diceplantica
  • 스테이터스 코드 :
  • 에러 코드 :
  • 에러 메시지 : “Login failed for some reason”;

string GetTokens()
{
#if UNITY_ANDROID

    if (PlayGamesPlatform.Instance.localUser.authenticated)
        return PlayGamesPlatform.Instance.GetIdToken();
    else
    {
        Debug.Log("GPGS Connect Error: GetToken");
        return null;
    }

else

    return null;

#endif

}

#endregion

void ConnectGoogleServer()
{
// 커스텀 정보 변수 생성.
#if UNITY_ANDROID
PlayGamesClientConfiguration config = new PlayGamesClientConfiguration
.Builder()
.RequestServerAuthCode(false)
.RequestIdToken()
.Build();

    // 적용
    PlayGamesPlatform.InitializeInstance(config);
    PlayGamesPlatform.DebugLogEnabled = true;

    // 호출
    PlayGamesPlatform.Activate();

#endif

}

public void OnBtnLoginGoogle()//구글 로그인
{

    if (Social.localUser.authenticated == true)
    {
        BackendReturnObject BRO = Backend.BMember.AuthorizeFederation(GetTokens(), FederationType.Google);

    }
    else
    {
        ConnectGoogleServer();

        Social.localUser.Authenticate((bool success) => {
            if (success)//토큰요청
            {
                // 로그인 성공 -> 뒤끝 서버에 획득한 구글 토큰으로 가입 요청
                BackendReturnObject BRO = Backend.BMember.AuthorizeFederation(GetTokens(), FederationType.Google);


                if(BRO.IsSuccess())
                {
                    string NickNameCheck = GetUserGamerNickName();

                    if (NickNameCheck == null || NickNameCheck == "")//닉네임 없을 때 
                    {
                        firstLoginPannel.SetActive(true);
                    }

                    else // 닉네임 있을 때 
                    {
                        PlayerPrefs.SetInt("AutoLogin", 2);
                        StartLoadingScence();
                    }


                }


            }
            else
            {
                // 로그인 실패
                tmpVersionText.text = "Login failed for some reason";
                
                
            }
        });
    }
}

예제를 거의 원본 그대로 따라했는데 “Login failed for some reason”; 오류만 뜨네요 힌트라도 알려주면 좋을텐데 답답해서 문의드립니다.

안녕하세요 개발자님
문의하신 내용은 구글의 로그인에 대한 내용이기에 정확하게 답변드리기는 어려움이 있으나.
구글 설정 또는 유니티의 설정이 잘못되어 있어 발생할 경우가 높습니다.

다음 안내드리는 내용들을 다시 한번 확인해 주세요.

  • 구글 클라우드 플랫폼의 테스터와 플레이 게임 서비스, 구글 콘솔에 등록된 테스터가 모두 동일한지 여부
  • 유니티에서 등록하는 웹클라이언트 ID와 구글 클라우드 플랫폼에서 생성한 웹 클라이언트ID인지 여부(안드로이드로 만든 클라이언트 ID로 등록하는 경우가 많음)

테스터가 모두 동일하지 않아서 생겼던 문제였습니다 감사합니다.

좋아요 1