Réglages

{{-- Messages AJAX / retours --}}
    @php $fortifyStatusMessages = [ 'two-factor-authentication-enabled' => 'Double authentification en attente d’activation.', 'two-factor-authentication-confirmed' => 'Double authentification activée avec succès.', 'two-factor-authentication-disabled' => 'Double authentification désactivée.', 'recovery-codes-generated' => 'Les codes de récupération ont été régénérés.', 'profile-information-updated' => 'Vos informations ont été mises à jour.', 'password-updated' => 'Votre mot de passe a été mis à jour.', ]; $statusMessage = session('status') ? ($fortifyStatusMessages[session('status')] ?? session('status')) : null; @endphp @if ($statusMessage)
    {{ $statusMessage }}
    @endif @if ($errors->any())
      @foreach ($errors->all() as $error)
    • {{ $error }}
    • @endforeach
    @endif @php $user = auth()->user(); $hasAvatar = !empty($user->avatar); $defaultAvatar = asset('img/placeholders/avatars/avatar2.jpg'); $currentAvatar = $hasAvatar ? asset('storage/' . $user->avatar) : $defaultAvatar; $twoFactorEnabled = !empty($user->two_factor_secret); $twoFactorConfirmed = !empty($user->two_factor_confirmed_at); $recoveryCodes = []; if ($twoFactorEnabled && !empty($user->two_factor_recovery_codes)) { try { $recoveryCodes = json_decode(decrypt($user->two_factor_recovery_codes), true) ?: []; } catch (\Throwable $e) { $recoveryCodes = []; } } @endphp {{-- FORMULAIRE PRINCIPAL : profil / email / mot de passe --}}
    @csrf @method('PUT')
    Informations
    Mise à jour du mot de passe
    Laisser vide pour ne pas changer le mot de passe
    Laisser vide pour ne pas changer le mot de passe

    {{-- SECTION 2FA SÉPARÉE --}}
    Double authentification
    @if ($twoFactorEnabled && $twoFactorConfirmed) Activée @elseif ($twoFactorEnabled) En attente de confirmation @else Désactivée @endif
    @if (! $twoFactorEnabled)
    @csrf

    Activez la 2FA pour sécuriser votre compte avec une application d'authentification.

    @else

    Utilisez Google Authenticator, Microsoft Authenticator, Authy ou 1Password.

    {!! $user->twoFactorQrCodeSvg() !!}
    @if (! $twoFactorConfirmed)
    @csrf

    Scannez le QR code puis saisissez le code généré par votre application.

    @endif @if ($twoFactorConfirmed)
    @if (!empty($recoveryCodes))
    @foreach ($recoveryCodes as $code)
    {{ $code }}
    @endforeach
    @else

    Aucun code disponible pour le moment.

    @endif
    @csrf
    @csrf @method('DELETE')
    @else
    @csrf @method('DELETE')
    @endif @endif