mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
No prefix key, issue #624
This commit is contained in:
parent
6aa240e9a3
commit
870d8b5008
@ -57,11 +57,7 @@ class PreferencesController extends Controller
|
|||||||
public function code(Google2FA $google2fa)
|
public function code(Google2FA $google2fa)
|
||||||
{
|
{
|
||||||
$domain = $this->getDomain();
|
$domain = $this->getDomain();
|
||||||
$secretKey = 'FIREFLYIII';
|
$secret = $google2fa->generateSecretKey(16);
|
||||||
$secretKey = str_pad($secretKey, intval(pow(2, ceil(log(strlen($secretKey), 2)))), 'X');
|
|
||||||
|
|
||||||
/** @noinspection PhpMethodParametersCountMismatchInspection */
|
|
||||||
$secret = $google2fa->generateSecretKey(16, $secretKey);
|
|
||||||
Session::flash('two-factor-secret', $secret);
|
Session::flash('two-factor-secret', $secret);
|
||||||
$image = $google2fa->getQRCodeInline('Firefly III at ' . $domain, auth()->user()->email, $secret, 150);
|
$image = $google2fa->getQRCodeInline('Firefly III at ' . $domain, auth()->user()->email, $secret, 150);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user