Refactor Nostr settings/connect

* Use NIP-42 auth event instead of short text note
* Verify event ID and signature using the nostr gem instead of custom code
This commit is contained in:
2024-04-01 18:22:32 +03:00
parent d4e67a830c
commit 22d362e1a0
9 changed files with 77 additions and 67 deletions

View File

@@ -3,6 +3,7 @@
<h4 class="mb-0">Public Key</h4>
<div data-controller="settings--nostr-pubkey"
data-settings--nostr-pubkey-user-address-value="<%= current_user.address %>"
data-settings--nostr-pubkey-site-value="<%= Setting.accounts_domain %>"
data-settings--nostr-pubkey-shared-secret-value="<%= session[:shared_secret] %>"
data-settings--nostr-pubkey-pubkey-hex-value="<%= current_user.nostr_pubkey %>">