OTP is one of the most popular 2FA methods. We use the `otp` plugin from rodauth for this purpose. The `otp_setup_*` configurations are related to OTP setup, while the `otp_disable_*` configurations are associated with disabling OTP. The `otp_auth_*` configurations are used for user authentication via OTP. I replaced 'TOPT' with 'One-Time Password' in the UI, as I believe it's more user-friendly.
24 lines
951 B
Plaintext
24 lines
951 B
Plaintext
<% @page_title = "2FA - One-Time Password" %>
|
|
|
|
<% @page_message = "Verify your sign in" %>
|
|
|
|
<form action="<%= rodauth.otp_auth_path %>" class="rodauth space-y-6" role="form" method="POST">
|
|
<%== rodauth.otp_auth_additional_form_tags %>
|
|
<%== rodauth.csrf_tag(rodauth.otp_auth_path) %>
|
|
|
|
<%== render("components/rodauth/otp_auth_code_field") %>
|
|
|
|
<div class="flex flex-col text-center">
|
|
<%== render("components/form/submit_button", locals: { text: rodauth.otp_auth_button }) %>
|
|
<p class="mt-10 text-center text-sm text-gray-400">
|
|
Can't access your authentication app?
|
|
<br>
|
|
<a href="/<%= rodauth.recovery_auth_route %>" class="font-semibold leading-6 text-orange-500 hover:text-orange-700">Enter a recovery code</a>
|
|
or
|
|
<a href="mailto:support@ubicloud.com" class="font-semibold leading-6 text-orange-500 hover:text-orange-700">contact support</a>
|
|
</p>
|
|
</div>
|
|
</form>
|
|
|
|
<%== rodauth.otp_auth_form_footer %>
|