diff --git a/src/QUI/Auth/Google2Fa/Auth.php b/src/QUI/Auth/Google2Fa/Auth.php
index a25e64869edbd1f90637f04ed8dc68aed37b7ba8..21818e115780ee708337d7c7c3389dd28293fe11 100644
--- a/src/QUI/Auth/Google2Fa/Auth.php
+++ b/src/QUI/Auth/Google2Fa/Auth.php
@@ -85,7 +85,7 @@ public function auth($authData)
         }
 
         foreach ($authSecrets as $k => $secretData) {
-            if ($this->Google2FA->verifyKey($secretData['key'], $authCode)) {
+            if ($this->Google2FA->verifyKey(trim($secretData['key']), $authCode)) {
                 return;
             }
 
@@ -93,7 +93,7 @@ public function auth($authData)
             foreach ($secretData['recoveryKeys'] as $k2 => $recoveryKey) {
                 $recoveryKey = trim(Security::decrypt($recoveryKey));
 
-                if (!$this->Google2FA->verifyKey($recoveryKey, $authCode)) {
+                if ($recoveryKey != $authCode) {
                     continue;
                 }