mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-04 10:42:23 +00:00
Co-authored-by: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Co-authored-by: Aditya Tripathi <aditya@climactic.co> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
24 lines
643 B
PHP
24 lines
643 B
PHP
<?php
|
|
|
|
namespace App\Livewire;
|
|
|
|
use Livewire\Component;
|
|
|
|
class TwoFactorRequired extends Component
|
|
{
|
|
public function mount()
|
|
{
|
|
if (filled(auth()->user()->two_factor_confirmed_at) && session('status') !== 'two-factor-authentication-confirmed') {
|
|
return redirect()->route('dashboard');
|
|
}
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return view('livewire.two-factor-required', [
|
|
'teamName' => data_get(session('currentTeam'), 'name'),
|
|
'teamsWithoutTwoFactor' => auth()->user()->teams()->where('is_two_factor_required', false)->get(),
|
|
])->layout('layouts.simple');
|
|
}
|
|
}
|