mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-15 16:22:25 +02:00
secret property now named uri to match otphp wording
This commit is contained in:
@ -31,7 +31,7 @@ class TwoFAccountController extends Controller
|
||||
{
|
||||
$twofaccount = TwoFAccount::create([
|
||||
'name' => $request->name,
|
||||
'secret' => $request->secret
|
||||
'uri' => $request->uri
|
||||
]);
|
||||
|
||||
return response()->json($twofaccount, 201);
|
||||
@ -59,7 +59,7 @@ class TwoFAccountController extends Controller
|
||||
public function generateTOTP(TwoFAccount $twofaccount)
|
||||
{
|
||||
try {
|
||||
$otp = Factory::loadFromProvisioningUri($twofaccount->secret);
|
||||
$otp = Factory::loadFromProvisioningUri($twofaccount->uri);
|
||||
} catch (InvalidArgumentException $exception) {
|
||||
return response()->json([
|
||||
'message' => 'Error generating TOTP',
|
||||
|
Reference in New Issue
Block a user