diff options
author | 2023-11-06 04:27:35 +1030 | |
---|---|---|
committer | 2023-11-05 18:57:35 +0100 | |
commit | 62ef8ed57aab9f2b05a64b153d231ae4f42769f4 (patch) | |
tree | acc33ab1fd02113f8fc93751e593dc67ff504a84 /internal/ui/settings_show.go | |
parent | 62188b49f072ea3c2bf30a8ed42f8b9303840191 (diff) | |
download | v2-62ef8ed57aab9f2b05a64b153d231ae4f42769f4.tar.gz v2-62ef8ed57aab9f2b05a64b153d231ae4f42769f4.tar.zst v2-62ef8ed57aab9f2b05a64b153d231ae4f42769f4.zip |
Add WebAuthn / Passkey integration
This is a rebase of #1618 in which @dave-atx added WebAuthn support.
Closes #1618
Diffstat (limited to 'internal/ui/settings_show.go')
-rw-r--r-- | internal/ui/settings_show.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/ui/settings_show.go b/internal/ui/settings_show.go index edbf0345..96714271 100644 --- a/internal/ui/settings_show.go +++ b/internal/ui/settings_show.go @@ -52,6 +52,12 @@ func (h *handler) showSettingsPage(w http.ResponseWriter, r *http.Request) { return } + creds, err := h.store.WebAuthnCredentialsByUserID(user.ID) + if err != nil { + html.ServerError(w, r, err) + return + } + view.Set("form", settingsForm) view.Set("themes", model.Themes()) view.Set("languages", locale.AvailableLanguages()) @@ -62,6 +68,8 @@ func (h *handler) showSettingsPage(w http.ResponseWriter, r *http.Request) { view.Set("countErrorFeeds", h.store.CountUserFeedsWithErrors(user.ID)) view.Set("default_home_pages", model.HomePages()) view.Set("categories_sorting_options", model.CategoriesSortingOptions()) + view.Set("countWebAuthnCerts", h.store.CountWebAuthnCredentialsByUserID(user.ID)) + view.Set("webAuthnCerts", creds) html.OK(w, r, view.Render("settings")) } |