secret property now named uri to match otphp wording

This commit is contained in:
Bubka
2019-05-26 23:24:22 +02:00
parent bb4fbfd46e
commit e7695b64bc
5 changed files with 18 additions and 18 deletions

View File

@ -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',