{{-- Page header --}}

{{ __('Security') }}

{{ __('Manage your password, two-factor authentication, and active sessions.') }}

{{-- Success / Status flash messages --}} @if (session('status'))

{{ session('status') }}

@endif {{-- ================================================================ CHANGE PASSWORD ================================================================ --}}
@csrf @method('PUT')

{{ __('Change Password') }}

{{ __('Ensure your account is using a strong, unique password.') }}

{{-- Current password --}}
@error('current_password', 'updatePassword')

{{ $message }}

@enderror
{{-- New password + confirm --}}
@error('password', 'updatePassword')

{{ $message }}

@enderror
{{-- Password requirements --}}

{{ __('Password requirements:') }}

  • {{ __('At least 8 characters') }}
  • {{ __('One uppercase letter') }}
  • {{ __('One number and one special character') }}
{{-- Submit --}}
{{-- ================================================================ TWO-FACTOR AUTHENTICATION ================================================================ --}} @php $user = auth()->user(); $twoFactorEnabled = $user->hasTwoFactorEnabled(); $rawCodes = $user->two_factor_recovery_codes ?? null; $recoveryCodes = null; if ($twoFactorEnabled && $rawCodes) { try { $recoveryCodes = json_decode(\Illuminate\Support\Facades\Crypt::decryptString($rawCodes), true); } catch (\Exception $e) { $recoveryCodes = null; } } @endphp

{{ __('Two-Factor Authentication') }}

{{ __('Add an extra layer of security to your account using an authenticator app.') }}

@if ($twoFactorEnabled) {{-- 2FA IS ENABLED --}}

{{ __('Two-factor authentication is') }} {{ __('enabled') }}. {{ __('Your account is secured with an authenticator app.') }}

@if ($user->two_factor_confirmed_at)

{{ __('Enabled on') }} {{ $user->two_factor_confirmed_at->format('M j, Y \a\t g:i A') }}

@endif
{{-- Recovery codes --}} @if (is_array($recoveryCodes) && count($recoveryCodes) > 0)

{{ __('Recovery Codes') }}

{{ __('Store these in a secure location. Each code can only be used once.') }}

@foreach ($recoveryCodes as $code) {{ $code }} @endforeach

{{ count($recoveryCodes) }} {{ __('recovery code(s) remaining') }}

@endif {{-- Disable 2FA form --}}
@csrf

{{ __('Enter your password to confirm disabling two-factor authentication.') }}

@error('password')

{{ $message }}

@enderror
@else {{-- 2FA IS NOT ENABLED --}}

{{ __('Two-factor authentication is not enabled.') }}

{{ __('Enable it to add an extra layer of security to your account. You will need an authenticator app like Google Authenticator or Authy.') }}

{{-- Enable 2FA link (goes to setup page with QR code) --}} {{ __('Set Up Two-Factor Authentication') }} @endif
{{-- ================================================================ ACTIVE SESSIONS ================================================================ --}}

{{ __('Active Sessions') }}

{{ __('Manage your logged-in devices and sessions.') }}

{{ __('Session management shows your active login sessions across devices.') }}

{{ __('Once') }} SESSION_DRIVER=database {{ __('is set in your environment, you will be able to view and revoke active sessions from all your devices here.') }}