예제 #1
0
 public void SetupTwoFactorAuthentication()
 {
     LootLockerSDKAdminManager.SetupTwoFactorAuthentication((response) =>
     {
         if (response.success)
         {
             LootLockerSDKAdminManager.DebugMessage("Successful setup two factor authentication: " + response.text);
         }
         else
         {
             LootLockerSDKAdminManager.DebugMessage("failed to set two factor authentication: " + response.Error, true);
         }
     });
 }
예제 #2
0
파일: Main.cs 프로젝트: Hertzole/unity-sdk
        public void AdminSetup2FA()
        {
            currentView = LootLockerView.Loading;

            LootLockerSDKAdminManager.SetupTwoFactorAuthentication((response) =>
            {
                if (response.success)
                {
                    Debug.LogError("Successful setup two factor authentication: " + response.text);
                    tfaTexture = new Texture2D(200, 200);
                    tfaTexture.LoadImage(Convert.FromBase64String(response.mfa_token_url.Substring(22)));
                    currentView = LootLockerView.VerifyTwoFactorAuth;
                }
                else
                {
                    Debug.LogError("failed to set two factor authentication: " + response.Error);
                    ResetToLogin();
                }
            });
        }