44 lines
1.6 KiB
Plaintext
44 lines
1.6 KiB
Plaintext
<% @page_title = "Passkeys" %>
|
|
|
|
<% content_for :header do %>
|
|
<div class="header__actions header__actions--start">
|
|
<%= back_link_to "My profile", user_path(Current.user), "keydown.left@document->hotkey#click keydown.esc@document->hotkey#click" %>
|
|
</div>
|
|
|
|
<h1 class="header__title" data-bridge--title-target="header"><%= @page_title %></h1>
|
|
<% end %>
|
|
|
|
<section class="panel panel--wide shadow center"
|
|
data-controller="credential"
|
|
data-credential-public-key-value="<%= @creation_options.as_json.to_json %>"
|
|
data-credential-register-url-value="<%= user_credentials_path(Current.user) %>">
|
|
|
|
<p class="font-weight-medium margin-none-block-start">Passkeys let you sign in securely without a password or email code.</p>
|
|
|
|
<% if @credentials.any? %>
|
|
<ul class="margin-none-block-start margin-block-end-double unpad">
|
|
<%= render partial: "users/credentials/credential", collection: @credentials %>
|
|
</ul>
|
|
<% end %>
|
|
|
|
<footer>
|
|
<button type="button" data-action="credential#create" data-credential-target="button" class="btn btn--link center txt-medium">
|
|
<%= icon_tag "add" %>
|
|
<span>Register a passkey</span>
|
|
</button>
|
|
|
|
<p class="txt-small txt-subtle txt-balance margin-none-block-end">
|
|
Your browser will prompt you to create a passkey using your device's biometrics, PIN, or security key
|
|
</p>
|
|
|
|
<p data-credential-target="error" class="txt-negative" hidden>
|
|
Something went wrong while registering your passkey.
|
|
</p>
|
|
|
|
<p data-credential-target="cancelled" class="txt-subtle" hidden>
|
|
Passkey registration was cancelled.
|
|
Try again when you are ready.
|
|
</p>
|
|
</footer>
|
|
</section>
|