Files
2026-11-04 16:47:55 +00:00

1 line
1.6 KiB
PHP

<x-layout title="Security · Tarnax"><div class="max-w-2xl space-y-6"><h1 class="mb-8">Account security</h1><section class="card"><h2>Two-factor authentication</h2>@if(!auth()->user()->two_factor_secret)<form method="post" action="/user/two-factor-authentication">@csrf<button class="button">Enable authenticator</button></form>@else<div class="bg-white p-4 inline-block rounded-xl">{!! auth()->user()->twoFactorQrCodeSvg() !!}</div>@if(!auth()->user()->two_factor_confirmed_at)<form method="post" action="/user/confirmed-two-factor-authentication" class="space-y-3 mt-5">@csrf<label>Authenticator code<input name="code" required autocomplete="one-time-code"></label><button class="button">Confirm setup</button></form>@else<p class="mt-4 text-cyan-200">Two-factor authentication is active.</p>@endif<details class="mt-4"><summary>Recovery codes — store securely</summary><pre class="mt-3 text-sm">{{ implode("\n",auth()->user()->recoveryCodes()) }}</pre></details><form method="post" action="/user/two-factor-authentication" class="mt-5">@csrf @method('DELETE')<button class="secondary">Disable two-factor authentication</button></form>@endif</section><section class="card"><h2>Change password</h2><form method="post" action="/user/password" class="space-y-4">@csrf @method('PUT')<label>Current password<input type="password" name="current_password" required></label><label>New password<input type="password" name="password" required></label><label>Confirm new password<input type="password" name="password_confirmation" required></label><button class="button">Update password</button></form></section></div></x-layout>