Beispiel #1
0
 public void TwoFactorAuthenticationCodeVerification()
 {
     LootLockerSDKAdminManager.TwoFactorAuthVerification(mfa_key, secret, (response) =>
     {
         if (response.success)
         {
             Debug.Log("Successful got two-factor authentication code: " + response.text);
         }
         else
         {
             Debug.LogError("failed to get two-factor authentication code: " + response.Error);
         }
     });
 }
Beispiel #2
0
        void DrawTwoFactorAuthView()
        {
            GUILayout.BeginArea(ContentSection);

            EditorGUILayout.LabelField("Please Enter Your Secret Code");
            EditorGUILayout.LabelField("You can obtain it from google authenticator", new GUIStyle(GUI.skin.label)
            {
                fontSize = 10
            });

            SecretCode = EditorGUILayout.TextField(SecretCode);

            if (GUILayout.Button("Submit"))
            {
                LootLockerSDKAdminManager.TwoFactorAuthVerification(MFAKey, SecretCode, (response) =>
                {
                    if (response.success)
                    {
                        Debug.Log("Successful 2FA: " + response.text);
                        FinalAuth(response);
                    }
                    else
                    {
                        ResetToLogin();
                        Debug.LogError("failed to get admin auth response: " + response.Error);
                    }
                });
            }

            if (GUILayout.Button("Back", GUILayout.Height(20)))
            {
                currentView = LootLockerView.Login;
            }

            GUILayout.EndArea();
        }