]> BookStack Code Mirror - bookstack/blobdiff - tests/Auth/MfaConfigurationTest.php
Made the TOTP URL visible during setup
[bookstack] / tests / Auth / MfaConfigurationTest.php
index eb0e2faf0f32d47134bb342928dcbca2a68016b0..685aad83a242016ba4e7cec714436be835f33d39 100644 (file)
@@ -36,10 +36,12 @@ class MfaConfigurationTest extends TestCase
         $resp->assertSee('The provided code is not valid or has expired.');
         $revisitSvg = $resp->getElementHtml('#main-content .card svg');
         $this->assertTrue($svg === $revisitSvg);
+        $secret = decrypt(session()->get('mfa-setup-totp-secret'));
+
+        $resp->assertSee(htmlentities("?secret={$secret}&issuer=BookStack&algorithm=SHA1&digits=6&period=30"));
 
         // Successful confirmation
         $google2fa = new Google2FA();
-        $secret = decrypt(session()->get('mfa-setup-totp-secret'));
         $otp = $google2fa->getCurrentOtp($secret);
         $resp = $this->post('/mfa/totp/confirm', [
             'code' => $otp,