/// <summary> /// 2. 로그인 /// </summary> void Check_Login() { //구글에 로그인 안됐을때 //그냥 로그인 안됏을때 if (BackEndAuthManager.Get_Join_User()) { if (BackEndAuthManager.Get_User_Type()) { //게스트 로그인 BackEndAuthManager.GoogleFireBaseLogin(); } else { //구글 로그인 Debug.Log("로그인 되있음"); SocalManager.Login(); } } else { Debug.Log("로그인 안되있음"); PopupManager.Open_Popup(LoginPopup); } }
private void Awake() { instance = this; Find_Obj(); AddListener(); BackEndAuthManager.Init(); SocalManager.Init(); }
private void AddListener() { toggle_Service.onValueChanged.AddListener((bool ison) => Check_Toggle()); btn_Service.onClick.AddListener(() => Application.OpenURL(" https://sites.google.com/site/breaktieme/terms-of-service")); toggle_Privacy.onValueChanged.AddListener((bool ison) => Check_Toggle()); btn_Privacy.onClick.AddListener(() => Application.OpenURL("https://sites.google.com/site/breaktieme/privacy-policy_kr")); btn_Service_Ok.onClick.AddListener(() => Open_Login()); btn_Google.onClick.AddListener(() => SocalManager.Login()); btn_Guest.onClick.AddListener(() => BackEndAuthManager.GoogleFireAnonymousLogin()); btn_Next.onClick.AddListener(() => Main_Scene()); logout.onClick.AddListener(() => BackEndAuthManager.Firebase_Logout()); }
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(); }); }