google2fa-qrcode
google2fa-qrcode copied to clipboard
getting this error
here is my controller function
`public function settings() { $user = Auth::user(); $google2fa_url = ""; $secret_key = "";
if($user->loginSecurity()->exists()){
$google2fa = (new \PragmaRX\Google2FAQRCode\Google2FA());
$google2fa_url = $google2fa->getQRCodeInline(
'KB CRYPTO',
$user->email,
$user->loginSecurity->google2fa_secret
);
$secret_key = $user->loginSecurity->google2fa_secret;
}
$data = array(
'user' => $user,
'secret' => $secret_key,
'google2fa_url' => $google2fa_url
);
return view('customer.settings', compact('user'))->with('data', $data);
}`
I have the same issue:
use PragmaRX\Google2FAQRCode\Google2FA;
$twoFa = new Google2FA();
$key = $twoFa->generateSecretKey();
$qrCode = $twoFa->getQRCodeInline("example", "example", $key);
message: You need to install a service package or assign yourself the service to be used.
Solved by installing one of the service package, as stated in the README:
Beginning on version 2.0 the rendering service is optional, so you have to manually install one of those packages in order to generate QRCodes
=> composer require bacon/bacon-qr-code
And BOOM!
Solved by installing one of the service package, as stated in the README:
Beginning on version 2.0 the rendering service is optional, so you have to manually install one of those packages in order to generate QRCodes
=>
composer require bacon/bacon-qr-code
And BOOM!
This warning should e writing in BIGGER FONTS, LOL!