<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class AuthorizationController extends Controller
{
public function showGoogle2FAForm()
{
$page_title = __("admin.page.google.2fa.verification");
return view('admin.auth.authorize.verify-google-2fa',compact('page_title'));
}
public function google2FASubmit(Request $request) {
$request->validate([
'code' => "required|string",
]);
$code = $request->code;
$user = auth()->user();
if(!$user->two_factor_secret) {
return back()->with(['warning' => [__("Your secret key not stored properly. Please contact with system administrator")]]);
}
if(google_2fa_verify($user->two_factor_secret,$code)) {
$user->update([
'two_factor_verified' => true,
]);
return redirect()->intended(route('admin.dashboard'));
}
return back()->with(['error' => [__("Invalid code. Please try again")]]);
}
}
To access the Kueue Pay Developer API, you’ll need an API key. You can obtain your API key by logging in to your Kueue Pay merchant account and navigating to the API section. Collect Client ID , Secret ID & Merchant ID Carefully. Keep your API key confidential and do not share it publicly.