@extends('layouts.portal') @section('title', 'Two-factor authentication') @section('subtitle', 'Protect your account with a code from an authenticator app every time you sign in.') @section('content')

{{ $user->hasTwoFactor() ? 'Two-factor authentication is on' : 'Set up your authenticator app' }}

@if($user->hasTwoFactor())Protected@endif
@if($required && ! $user->hasTwoFactor())
Your account can open the back office ({{ $user->roleLabel() }}), so two-factor authentication is required.
@endif @if(! $user->hasTwoFactor())
  1. Install Google Authenticator, Microsoft Authenticator, Authy or 1Password on your phone.
  2. Scan this QR code, or enter the key manually.
  3. Type the 6-digit code it shows to confirm.
{!! $qr !!}
Setup key
{{ trim(chunk_split($secret, 4, ' ')) }}
@csrf
@error('code')
{{ $message }}
@enderror
@else

Signed-in sessions ask for a code from your authenticator app. Remaining recovery codes: {{ count((array) $user->two_factor_recovery_codes) }}.

@csrf
@error('code')
{{ $message }}
@enderror @unless($required)
@csrf
@endunless @endif
@if($codes)

Your recovery codes

Each code works once if you lose your phone. Store them in a password manager. They will not be shown again.

@foreach($codes as $c){{ $c }}@endforeach
@endif
@endsection