Change 2FA service to generate the secret on our own and use an external QR service to display the image
This commit is contained in:
parent
2db7928b76
commit
092e7e79ff
5 changed files with 44 additions and 186 deletions
|
@ -90,8 +90,10 @@ class SecurityController extends Controller
|
|||
*/
|
||||
public function generateTotp(Request $request)
|
||||
{
|
||||
$totpData = $this->twoFactorSetupService->handle($request->user());
|
||||
|
||||
return response()->json([
|
||||
'qrImage' => $this->twoFactorSetupService->handle($request->user()),
|
||||
'qrImage' => 'https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=' . $totpData,
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue