Two-Step Verification

A code from your phone, on top of your password. Without it, a stolen password is enough on its own.

@if (session('success'))
{{ session('success') }}
@endif {{-- Shown once, on the redirect after enrolling, and never again -- they are stored hashed, so the application itself cannot show them a second time. The screen has to say so plainly or somebody will assume they can come back for them. --}} @if ($recoveryCodes)

Save these recovery codes now

Each one signs you in once if you lose your phone. This is the only time they can be shown — they are stored hashed, so nobody, including this system, can read them back.

@foreach ($recoveryCodes as $code) {{ $code }} @endforeach
@endif @if ($enabled)

Two-step verification is on

You have {{ $remaining }} recovery {{ \Illuminate\Support\Str::plural('code', $remaining) }} left.

@csrf @method('DELETE') {{-- The password is asked for because switching this off weakens the account, and an unattended browser should not be able to do it. Same reason changing a password asks for the old one. --}} @error('password')

{{ $message }}

@enderror
@else

Set it up

  1. 1. Install Google Authenticator, or any authenticator app.
  2. 2. Scan this code with it.
    {{-- Always shown, not tucked behind "can't scan?". The QR is drawn by a script from a CDN, and a person on a blocked network or a desktop app needs a way in that does not depend on it loading. --}}

    Or type this key in by hand:

    {{ trim(chunk_split($secret, 4, ' ')) }}

  3. 3. Enter the 6-digit code it shows, to prove it works before this is switched on.
    @csrf
    @error('code')

    {{ $message }}

    @enderror
@endif