@extends('account.layout') @section('title', 'Account Security & 2FA — '.setting('site_name', 'BambooNest')) @section('account_content') {{-- Recovery codes shown right after enabling / regenerating --}} @if(session('recovery_codes'))

Save Your Recovery Codes

Each single-use code lets you sign in if you lose access to your authenticator app. Store them securely now.

@foreach(session('recovery_codes') as $rc) {{ $rc }} @endforeach
@endif {{-- Two-Factor Authentication --}}

Two-Factor Authentication (TOTP)

Protect your account with Google Authenticator, Authy or 1Password.

@if($user->hasTwoFactor()) Active @else Inactive @endif
@if(! $user->hasTwoFactor()) @if($setup)
{!! $setup['qrSvg'] !!}

Secret: {{ $setup['secret'] }}

@csrf

Scan the QR code with your authenticator app, then enter the 6-digit code below to activate 2FA.

@error('code')

{{ $message }}

@enderror
@else
@csrf
@endif @else
@csrf

Regenerate Recovery Codes

@csrf @method('DELETE')

Turn Off 2FA

@endif
{{-- Change Password --}}

Change Password

@csrf @method('PUT')
@error('current_password')

{{ $message }}

@enderror
@error('password')

{{ $message }}

@enderror
{{-- Active Sessions --}} @if($sessions->isNotEmpty())

Active Browser Sessions

@foreach($sessions as $s)

{{ $s->ip }} @if($s->is_current)This device@endif

{{ $s->agent }}

{{ $s->last_active->diffForHumans() }}
@endforeach
@csrf
@endif {{-- Recent Security Activity --}} @if($recentEvents->isNotEmpty())

Recent Account Activity

@foreach($recentEvents as $ev)
{{ $ev->description ?: $ev->event }} ({{ $ev->ip_address }})
{{ $ev->created_at?->diffForHumans() }}
@endforeach
@endif @endsection