Add a settings page (for experimental settings) that can verify and save nostr pubkeys for user accounts. It currently only allows adding keys from a browser extension, but not from manual signing outside of the browser.
Auth for publishing events to a potential Kosmos relay
Note: tagged WIP, because without any of the above-mentioned features, this is currently not useful to anyone. Adding the NIP-05 endpoint is the first and easiest feature to base on top of this now.
Update: NIP-05 support has been added in the meantime, see comments and commits.
Add a settings page (for experimental settings) that can verify and save nostr pubkeys for user accounts. It currently only allows adding keys from a browser extension, but not from manual signing outside of the browser.
This can then be used for:
* #98 — [NIP-05](https://github.com/nostr-protocol/nips/blob/master/05.md) user addresses (i.e. make your pubkey discoverable via your username@kosmos.org address)
* #99 — Two-factor authentication
* Notifications of all kinds (via encrypted DM)
* Auth for publishing events to a potential Kosmos relay
Note: tagged WIP, because without any of the above-mentioned features, this is currently not useful to anyone. Adding the NIP-05 endpoint is the first and easiest feature to base on top of this now.
Update: NIP-05 support has been added in the meantime, see comments and commits.
closes #98
adds quite some dependencies (like the websocket stuff) but I guess it's fine here as it is not conflicting with any dependencies that we already have.
adds quite some dependencies (like the websocket stuff) but I guess it's fine here as it is not conflicting with any dependencies that we already have.
It was supposed to be so that you can add the same key for accounts with different domains, but actually now that you mention it, I think it should always be unique, since you can only point back to one of them anyway.
It was supposed to be so that you can add the same key for accounts with different domains, but actually now that you mention it, I think it should always be unique, since you can only point back to one of them anyway.
wondering if any other nip05 provider implements this that well currently
Thanks. I was wondering the same. :)
I addressed your comments and resolved the one about the uniqueness validation.
> wondering if any other nip05 provider implements this that well currently
Thanks. I was wondering the same. :)
I addressed your comments and resolved the one about the uniqueness validation.
This is now ready to merge. I have adjusted all the code to the refactored user settings routes and controller, as well as resolved the other merge conflicts.
Also, NIP-05 support was added a few weeks ago, so it's actually useful now. And I also just added a hint for users to update their public profile with the address, which is visible when a pubkey has been added.
This is now ready to merge. I have adjusted all the code to the refactored user settings routes and controller, as well as resolved the other merge conflicts.
Also, NIP-05 support was added a few weeks ago, so it's actually useful now. And I also just added a hint for users to update their public profile with the address, which is visible when a pubkey has been added.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Add a settings page (for experimental settings) that can verify and save nostr pubkeys for user accounts. It currently only allows adding keys from a browser extension, but not from manual signing outside of the browser.
This can then be used for:
Note: tagged WIP, because without any of the above-mentioned features, this is currently not useful to anyone. Adding the NIP-05 endpoint is the first and easiest feature to base on top of this now.
Update: NIP-05 support has been added in the meantime, see comments and commits.
closes #98
@@ -49,2 +49,4 @@gem 'sidekiq-scheduler'# Servicesgem 'nostr', git: 'https://gitea.kosmos.org/kosmos/nostr-gem.git', branch: 'feature/ruby_2.7_compat'adds quite some dependencies (like the websocket stuff) but I guess it's fine here as it is not conflicting with any dependencies that we already have.
Yeah, the idea is that we can very easily add more nostr features using the same library.
@@ -30,3 +30,2 @@scope :confirmed, -> { where.not(confirmed_at: nil) }scope :pending, -> { where(confirmed_at: nil) }validates_uniqueness_of :nostr_pubkey, scope: :ou, allow_blank: truewhy the
scope :ou?It was supposed to be so that you can add the same key for accounts with different domains, but actually now that you mention it, I think it should always be unique, since you can only point back to one of them anyway.
@@ -33,0 +32,4 @@scope :confirmed, -> { where.not(confirmed_at: nil) }scope :pending, -> { where(confirmed_at: nil) }scope :all_except, -> (user) { where.not(id: user) }does this need
where.not(id: user.id)?It's magic. ;)
wondering if any other nip05 provider implements this that well currently
Thanks. I was wondering the same. :)
I addressed your comments and resolved the one about the uniqueness validation.
This is now ready to merge. I have adjusted all the code to the refactored user settings routes and controller, as well as resolved the other merge conflicts.
Also, NIP-05 support was added a few weeks ago, so it's actually useful now. And I also just added a hint for users to update their public profile with the address, which is visible when a pubkey has been added.
caeb13974ctobfc0969829