@extends('layouts.platform') @section('title', 'Account Security') @section('header', 'Account Security') @section('content')
@if (session('success'))
{{ session('success') }}
@endif @if (!empty($freshRecoveryCodes))

Save your recovery codes

Each code works exactly once. Store them somewhere safe — if you lose your authenticator app, these are the only way back into your account.

@foreach ($freshRecoveryCodes as $code) {{ $code }} @endforeach
@endif {{-- 2FA Status --}}

Two-Factor Authentication

Add an extra layer of protection to your Super Admin account using an authenticator app (Google Authenticator, Authy, etc.).

@if ($enabled) Enabled @else Disabled @endif
@if (!$enabled)

Scan the QR code below with your authenticator app, or enter the secret manually, then confirm with a code to enable.

@php $issuer = config('app.name', 'Pishon'); $otpauth = app(\App\Services\Auth\TwoFactorService::class)->otpAuthUrl($user, $secret, $issuer); $qr = \SimpleSoftwareIO\QrCode\Facades\QrCode::size(200)->margin(1) ->color(31, 41, 55)->backgroundColor(255, 255, 255) ->generate($otpauth); @endphp
{!! $qr !!}
{{ $secret }}
@csrf
@error('code')

{{ $message }}

@enderror
@else
Two-factor authentication is active on this account. You will be asked for a code on every sign-in.

Recovery codes

Invalidating and issuing a fresh batch of one-time recovery codes.

@csrf
@error('current_password')

{{ $message }}

@enderror

Disable two-factor authentication

Removing 2FA weakens this account's security. Confirm with your current password.

@csrf
@endif
@endsection