コード例 #1
0
 /**
  * @param Google2FA $google2fa
  *
  * @return View
  */
 public function code(Google2FA $google2fa)
 {
     $domain = $this->getDomain();
     /** @noinspection PhpMethodParametersCountMismatchInspection */
     $secret = $google2fa->generateSecretKey(16, auth()->user()->id);
     Session::flash('two-factor-secret', $secret);
     $image = $google2fa->getQRCodeInline('Firefly III at ' . $domain, null, $secret, 150);
     return view('preferences.code', compact('image'));
 }