43 lines
1.2 KiB
Text
43 lines
1.2 KiB
Text
<Layouts.app flash={@flash} current_scope={@current_scope}>
|
|
<div class="mx-auto max-w-sm">
|
|
<div class="text-center">
|
|
<.header>
|
|
Two-Factor Authentication
|
|
<:subtitle>
|
|
Enter the 6-digit code from your authenticator app
|
|
</:subtitle>
|
|
</.header>
|
|
</div>
|
|
|
|
<div class="mt-8">
|
|
<.form :let={f} for={@form} as={:user} id="totp_form" action={~p"/users/log-in/totp"}>
|
|
<.input
|
|
field={f[:totp_code]}
|
|
type="text"
|
|
label="Authentication Code"
|
|
placeholder="000000"
|
|
autocomplete="one-time-code"
|
|
inputmode="numeric"
|
|
pattern="[0-9]{6}"
|
|
maxlength="6"
|
|
required
|
|
phx-mounted={JS.focus()}
|
|
/>
|
|
<div class="mt-6">
|
|
<.button class="w-full" variant="primary">
|
|
Verify <span aria-hidden="true">→</span>
|
|
</.button>
|
|
</div>
|
|
</.form>
|
|
|
|
<div class="mt-6 text-center">
|
|
<.link
|
|
href={~p"/users/log-in"}
|
|
class="text-sm font-semibold text-gray-600 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"
|
|
>
|
|
← Back to login
|
|
</.link>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</Layouts.app>
|