mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-12 00:15:50 -06:00
Code for #1503
This commit is contained in:
parent
3a71bd01fb
commit
793cfcb2c5
@ -107,9 +107,10 @@ class ProfileController extends Controller
|
||||
$domain = $this->getDomain();
|
||||
$secret = Google2FA::generateSecretKey();
|
||||
session()->flash('two-factor-secret', $secret);
|
||||
|
||||
$image = Google2FA::getQRCodeInline($domain, auth()->user()->email, $secret, 200);
|
||||
|
||||
return view('profile.code', compact('image'));
|
||||
return view('profile.code', compact('image','secret'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -465,6 +465,7 @@ return [
|
||||
'pref_two_factor_auth_code_help' => 'Scan the QR code with an application on your phone such as Authy or Google Authenticator and enter the generated code.',
|
||||
'pref_two_factor_auth_reset_code' => 'Reset verification code',
|
||||
'pref_two_factor_auth_disable_2fa' => 'Disable 2FA',
|
||||
'2fa_use_secret_instead' => 'If you cannot scan the QR code, feel free to use the secret instead: :secret.',
|
||||
'pref_save_settings' => 'Save settings',
|
||||
'saved_preferences' => 'Preferences saved!',
|
||||
'preferences_general' => 'General',
|
||||
|
@ -22,6 +22,9 @@
|
||||
<img src="{{ image }}" alt="" title=""
|
||||
style="border:1px #ddd solid;"/>
|
||||
</div>
|
||||
<p>
|
||||
{{ trans('firefly.2fa_use_secret_instead', {secret: secret}) }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user