authentikate/app/Livewire/ConsentScreen.php
Javier Feliz eeb6b4bc0e
Some checks failed
tests / ci (push) Waiting to run
linter / quality (push) Has been cancelled
Initial commit
2025-07-27 02:31:34 -04:00

37 lines
769 B
PHP

<?php
namespace App\Livewire;
use App\Models\Application;
use Livewire\Attributes\Layout;
use Livewire\Component;
#[Layout('components.layouts.background')]
class ConsentScreen extends Component
{
public Application $client;
public string $redirectUrl;
public function mount()
{
$this->client = Application::find(session('app_id'));
$this->redirectUrl = session('redirect_on_confirm');
}
public function approve()
{
session()->forget(['app_id', 'redirect_on_confirm']);
return $this->redirect($this->redirectUrl);
}
public function deny()
{
return $this->redirect(route('dashboard'));
}
public function render()
{
return view('livewire.consent-screen');
}
}