문의를 남기실 경우 다음 항목을 작성해 주세요.
정보가 부족한 경우 확인 및 답변이 지연될 수 있습니다.
- 뒤끝 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”; 오류만 뜨네요 힌트라도 알려주면 좋을텐데 답답해서 문의드립니다.