public void Open_Login() { PlayerPrefs.SetInt("Service", 1); PopupManager.Close_Popup(); PopupManager.Open_Popup(LoginPopup); }
public static void Login() { Social.localUser.Authenticate(success => { if (success == false) { Debug.Log("구글 로그인 실패"); return; } // 로그인이 성공되었습니다. Debug.Log("GetIdToken - " + PlayGamesPlatform.Instance.GetIdToken()); Debug.Log("Email - " + ((PlayGamesLocalUser)Social.localUser).Email); Debug.Log("GoogleId - " + Social.localUser.id); Debug.Log("UserName - " + Social.localUser.userName); Debug.Log("UserName - " + PlayGamesPlatform.Instance.GetUserDisplayName()); PopupManager.Close_Popup(); BackEndAuthManager.GoogleFireBaseLogin(); }); }
/// <summary> /// 구글 로그인 /// </summary> public static void GoogleFireBaseLogin() { PopupManager.Close_Popup(); if (auth.CurrentUser == null) { Debug.Log("로그인 안 되어 있음"); Firebase.Auth.Credential credential = Firebase.Auth.GoogleAuthProvider.GetCredential(SocalManager.GetTokens(), null); auth.SignInWithCredentialAsync(credential).ContinueWith(task => { if (task.IsCanceled) { return; } if (task.IsFaulted) { return; } user_id = auth.CurrentUser.UserId; BackEndDataManager.instance.Get_First_Data(); }); } else { //Set_State("로그인 되어 있음 " + auth.CurrentUser.UserId); Debug.Log("로그인 되어 있음 " + auth.CurrentUser.DisplayName + " \n " + auth.CurrentUser.Email + " \n " + auth.CurrentUser.IsAnonymous + " \n " + auth.CurrentUser.IsEmailVerified + " \n " + auth.CurrentUser.ProviderId + " \n " + auth.CurrentUser.UserId + " \n "); user_id = auth.CurrentUser.UserId; BackEndDataManager.instance.Get_First_Data(); } }
/// <summary> /// 익명로그인 /// </summary> public static void GoogleFireAnonymousLogin() { PopupManager.Close_Popup(); if (auth.CurrentUser == null) { Debug.Log("로그인 안 되어 있음"); auth.SignInAnonymouslyAsync().ContinueWith(task => { if (task.IsCanceled) { return; } if (task.IsFaulted) { return; } user_id = auth.CurrentUser.UserId; Debug.Log("익명 아이디 " + user_id); BackEndDataManager.instance.Get_First_Data(); }); } else { //Set_State("로그인 되어 있음 " + auth.CurrentUser.UserId); Debug.Log("로그인 되어 있음 " + auth.CurrentUser.DisplayName + " \n " + auth.CurrentUser.Email + " \n " + auth.CurrentUser.IsAnonymous + " \n " + auth.CurrentUser.IsEmailVerified + " \n " + auth.CurrentUser.ProviderId + " \n " + auth.CurrentUser.UserId + " \n "); user_id = auth.CurrentUser.UserId; BackEndDataManager.instance.Get_First_Data(); } }