Exemple #1
0
 /*
  * ////////////////
  * // 이메일 로그인 //
  * ////////////////
  * public void EmailLogin()
  * {
  *  // 적당한 UGUI 를 만들어 email, pw 를 입력받는다.
  *  var email = EmailCreatePanel.transform.Find("email").Find("Text").GetComponent<UnityEngine.UI.Text>().text;
  *  var pw = EmailCreatePanel.transform.Find("pw").Find("Text").GetComponent<UnityEngine.UI.Text>().text;
  *
  *  if (email.Length < 1 || pw.Length < 1)
  *  {
  *      Debug.Log("이메일 ID 나 PW 가 비어있습니다.");
  *      return;
  *  }
  *
  *  auth.CreateUserWithEmailAndPasswordAsync(email, pw).ContinueWith(task =>
  *  {
  *      if (task.IsCanceled)
  *      {
  *          UnityEngine.Debug.LogError("CreateUserWithEmailAndPasswordAsync was canceled.");
  *          return;
  *      }
  *      if (task.IsFaulted)
  *      {
  *          UnityEngine.Debug.LogError("CreateUserWithEmailAndPasswordAsync encountered an error: " + task.Exception);
  *          return;
  *      }
  *
  *      // firebase email user create
  *      Firebase.Auth.FirebaseUser newUser = task.Result;
  *      UnityEngine.Debug.LogFormat("Firebase Email user created successfully: {0} ({1})", newUser.DisplayName, newUser.UserId);
  *      return;
  *  });
  * }
  */
 // 연동 해제
 public void SignOut()
 {
     if (auth.CurrentUser != null)
     {
         auth.SignOut();
     }
 }
Exemple #2
0
 public void logout()
 {
     auth.SignOut();
     PlayerPrefs.SetInt(RefDefinition.OFFLINE_MODE, 1);
     ShowPlayPanel();
     topBarPanel.SetActive(false);
 }
 /// <summary>
 /// サインアウト
 /// 実際にはユーザーの削除
 /// </summary>
 public Task SignOut()
 {
     return(auth.CurrentUser.DeleteAsync().ContinueWith(task =>
     {
         auth.SignOut();
     }));
 }
    public static void AuthQuit()
    {
        Auth.SignOut();

        Debug.Log("Firebase Auth - Usuário deslogado com sucesso.");
        TecWolf.System.SystemInterface.Alert("Conta deslogada com sucesso.");
    }
Exemple #5
0
 //Function for the sign out button
 public void SignOutButton()
 {
     auth.SignOut();
     UIManager.instance.LoginScreen();
     ClearRegisterFeilds();
     ClearLoginFeilds();
 }
Exemple #6
0
    /**
     * this method handles OnClick for sign out
     */
    public void SignOutButton()
    {
        FirebaseAuth auth = firebasesManager.GetComponent <FirebaseManager>().auth;

        auth.SignOut();
        SceneManager.LoadScene("LoginScene");
    }
Exemple #7
0
    public void signOutUser()
    {
        FirebaseAuth auth = UserLogged.getFirebaseAuth();

        auth.SignOut();
        SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex - 3);
    }
Exemple #8
0
 public void LogoutUser()
 {
     _CanMatching = false;
     auth.SignOut();
     UserLoginCheck();
     _RecordBlockCount = -1;
 }
Exemple #9
0
 // Start is called before the first frame update
 public void Signout()
 {
     auth = Firebase.Auth.FirebaseAuth.DefaultInstance;
     Debug.Log("Signout Called");
     auth.SignOut();
     //auth.StateChanged -= AuthStateChanged;
     SceneManager.LoadScene("StartScene");
 }
Exemple #10
0
 public void TryGoogleLogout()
 {
     if (Social.localUser.authenticated)       // 로그인 되어 있다면
     {
         PlayGamesPlatform.Instance.SignOut(); // Google 로그아웃
         auth.SignOut();                       // Firebase 로그아웃
     }
 }
Exemple #11
0
    public void SignOut()
    {
        //Mapbox.Unity.Utilities.Console.Instance.Log("Signing out", "lightblue");

        auth.SignOut();

        //Mapbox.Unity.Utilities.Console.Instance.Log("Signing out after", "lightblue");
    }
        public virtual void Logout()
        {
            Debug.Log("LoginFirebase Logout: ");
#if ENABLE_FIREBASE
            auth.SignOut();
#endif
            signedIn = false;
        }
Exemple #13
0
 private void LogoutUser()
 {
     auth.SignOut();
     if (auth.CurrentUser == null)
     {
         StartActivity(new Intent(this, typeof(LoginActivity)));
     }
 }
Exemple #14
0
    /**
     * this method handles OnClick for sign out button
     */
    public void SignOutButton()
    {
        GameObject   firebasesManager = GameObject.FindGameObjectWithTag("firebase");
        FirebaseAuth auth             = firebasesManager.GetComponent <FirebaseManager>().auth;

        auth.SignOut();
        SceneManager.LoadScene("LoginScene");
    }
Exemple #15
0
    /// <summary>
    /// Logout from the current logged in user
    /// </summary>
    public static void Logout()
    {
        ProjectManager.Log("[Firebase Logout] " + auth.CurrentUser.DisplayName);

        auth.SignOut();

        staticRef.OnLogout();
    }
Exemple #16
0
    public void FirebaseLogout()
    {
        auth = FirebaseAuth.DefaultInstance;
        user = auth.CurrentUser;

        auth.SignOut();
        Debug.LogWarning(user.DisplayName);
    }
 public void SignOut()
 {
     if (m_auth != null)
     {
         m_auth.SignOut();
         MenuController.m_Instance.OnAuthenticatinChangedUpdatePlayerInfo(false);
     }
 }
 public static void AuthLogOut()
 {
     if (auth.CurrentUser != null)
     {
         auth.SignOut();
         auth.StateChanged -= AuthStateChanged;
     }
 }
Exemple #19
0
 /// <summary>
 /// Notifies firebase to sign out the user,
 /// redirects to login activity
 /// </summary>
 public void LogoutUser()
 {
     auth.SignOut();
     if (auth.CurrentUser == null)
     {
         StartActivity(new Intent(this, typeof(MainActivity)));
         Finish();
     }
 }
Exemple #20
0
 public void InitAuthorization()
 {
     auth.SignOut();
     auth.StateChanged += PostAuth;
     AuthUser(
         usernameField.GetComponent <TMPro.TMP_InputField>().text,
         passwordField.GetComponent <TMPro.TMP_InputField>().text
         );
 }
Exemple #21
0
    // Sign Out from Email
    private void OnSignOutFromEmail()
    {
        Debug.Log("Logout a user");
        auth.SignOut();

        // Load scene
        Debug.Log("Loading App_Regist scene...");
        SceneManager.LoadScene("App_Splash");
    }
Exemple #22
0
 private void LogoutUser()
 {
     auth.SignOut();
     if (auth.CurrentUser == null)
     {
         LocalProvider.ClearCurrentUser();
         StartActivity(new Intent(this, typeof(Login)));
     }
 }
Exemple #23
0
 private void LogoutUser()
 {
     auth.SignOut();
     if (auth.CurrentUser == null)
     {
         StartActivity(new Intent(this, typeof(MainDashboard)));
         Finish();
     }
 }
    public IEnumerator LoginWithFacebook()
    {
        auth.SignOut();
        LoadingScreen.Instance.Show("Siging in with Facebook...");
        yield return(new WaitUntil(() => FB.IsInitialized));

        string        accessToken = "";
        List <string> permissions = new List <string>();

        permissions.Add("public_profile");
        permissions.Add("email");
        FB.LogInWithReadPermissions(permissions, delegate(ILoginResult result)
        {
            if (!string.IsNullOrEmpty(result.Error) || !FB.IsLoggedIn)
            {
                ILogger.Instance.ShowMessage("Failed to login in with facebook", LoggerType.error);
                LoadingScreen.Instance.Hide();
                Debug.LogError(result.Error);
                return;
            }

            accessToken = AccessToken.CurrentAccessToken.TokenString;
            Debug.Log(accessToken);
            FB.API("me?fields=first_name", HttpMethod.GET, delegate(IGraphResult res)
            {
                if (res.Error == null)
                {
                    Debug.Log(res.ResultDictionary["first_name"] + ": " + AccessToken.CurrentAccessToken.UserId + "\nExpires in: " + AccessToken.CurrentAccessToken.ExpirationTime);
                }
            });
            Credential credential = FacebookAuthProvider.GetCredential(accessToken);
            auth.SignInWithCredentialAsync(credential).ContinueWith(task =>
            {
                LoadingScreen.Instance.Hide();
                if (task.IsCanceled)
                {
                    Debug.LogError("SignInWithCredentialAsync was canceled.");
                    return;
                }
                if (task.IsFaulted)
                {
                    Debug.LogError("SignInWithCredentialAsync encountered an error: " + task.Exception);
                    return;
                }
                User = task.Result;
                if (User != null)
                {
                    string name          = User.DisplayName;
                    string email         = User.Email;
                    System.Uri photo_url = User.PhotoUrl;
                    Debug.Log(name + ": " + email + ": " + photo_url);
                    LoginScreenUI.Instance.AfterLogin();
                }
            });
        });
    }
 private void LogoutUser()
 {
     auth.SignOut();
     AppData.LoggedInUser = null;
     if (auth.CurrentUser == null)
     {
         StartActivity(new Intent(this, typeof(MainActivity)));
         Finish();
     }
 }
Exemple #26
0
        public bool OnNavigationItemSelected(IMenuItem menuItem)
        {
            switch (menuItem.ItemId)
            {
            case Resource.Id.nav_Logout:
            {
                firebaseAuth.SignOut();
                prefs = PreferenceManager.GetDefaultSharedPreferences(this);
                var mString = prefs.GetString("WhichButtonClick", "");
                if (mString == "facebook")
                {
                    LoginManager.Instance.LogOut();
                }
                StartActivity(new Intent(Application.Context, typeof(LoginActivity)));
                break;
            }

            case Resource.Id.nav_settings:
            {
                Intent intent = new Intent(this, typeof(SettingsActivity));
                StartActivity(intent);
                break;
            }

            case Resource.Id.nav_FeedBack:
            {
                var intent = new Intent(Android.Content.Intent.ActionView);
                intent.SetData(Android.Net.Uri.Parse("https://expensetracker-feedback.web.app/"));
                StartActivity(intent);
                //var email = new Intent(Android.Content.Intent.ActionSend);
                //email.PutExtra(Android.Content.Intent.ExtraEmail, new string[] { "*****@*****.**" });
                //email.PutExtra(Android.Content.Intent.ExtraSubject, "Feedback about "+ GetString(Resource.String.app_name));
                //email.SetType("message/rfc822");
                //StartActivity(email);
                break;
            }

            case Resource.Id.nav_rating:
            {
                var appPackageName = this.PackageName;
                try
                {
                    StartActivity(new Intent(Intent.ActionView, Android.Net.Uri.Parse("market://details?id=" + appPackageName)));
                }
                catch (Android.Content.ActivityNotFoundException anfe)
                {
                    StartActivity(new Intent(Intent.ActionView, Android.Net.Uri.Parse("https://play.google.com/store/apps/details?id=" + appPackageName)));
                }
                break;
            }
            }
            //close navigation drawer
            drawerLayout.CloseDrawer(GravityCompat.Start);
            return(false);
        }
Exemple #27
0
    public void OnSignOutUser()
    {
        ClearUserManagerValue();

        Debug.Log("Logout a user");
        auth.SignOut();

        // Load scene
        Debug.Log("Loading App_Regist scene...");
        SceneManager.LoadScene("App_Splash");
    }
Exemple #28
0
 public void TryGoogleLogout()
 {
     if (Social.localUser.authenticated)       // 로그인 되어 있다면
     {
         PlayGamesPlatform.Instance.SignOut(); // Google 로그아웃
         auth.SignOut();                       // Firebase 로그아웃
         googleText.SetActive(true);
         ranking.SetActive(false);
         LogOut.SetActive(false);
     }
 }
    public void SignOut()
    {
        if (auth != null)
        {
            auth.SignOut();
        }

        currentUser     = null;
        currentToken    = null;
        stsTokenManager = null;
    }
Exemple #30
0
 private void SignOut()
 {
     auth.SignOut();
     user = auth.CurrentUser;
     if (user == null)
     {
         Debug.Log("SignOut Ja");
         SceneManager.LoadScene("LoginScene");
         //SceneManager.LoadSceneAsync("LoginScene");
     }
 }