Code Duplication    Length = 5-5 lines in 2 locations

src/app/Balloon.App.Idp/GrantType/UserCredentialsMultiFactor.php 1 location

@@ 93-97 (lines=5) @@
90
            throw new \LogicException('no google authenticator secret available');
91
        }
92
93
        if ($this->authenticator->authenticate($user['google_auth_secret'], $request->request('code')) === false) {
94
            $response->setError(400, 'invalid_grant', 'Invalid auth code provided');
95
96
            return null;
97
        }
98
99
        $this->user = $user;
100

src/app/Balloon.App.Webauthn/GrantType/WebauthnMfa.php 1 location

@@ 74-78 (lines=5) @@
71
            throw new \LogicException('no google authenticator secret available');
72
        }
73
74
        if ($this->authenticator->authenticate($this->user['google_auth_secret'], $request->request('code')) === false) {
75
            $response->setError(400, 'invalid_grant', 'Invalid auth code provided');
76
77
            return null;
78
        }
79
80
        return $result;
81
    }