Oddbean new post about | logout

Notes by brugeman | export

 Introducing nsec.app and nostr-login!

I've shown the prototype of https://nsec.app in December, and it's essentially an nsecbunker in your browser. It is non-custodial - your keys are stored locally in the browser, and apps can get access to your keys using NIP46. We've now turned that prototype into a real thing, and I invite you to try it. Shoutout to @nielliesmons for the designs!

Now how do we help Nostr apps adopt NIP46 for remote key access? 

That's where nostr-login library comes in. If your app uses NIP07 to talk to a browser extension, then with just two lines of code you can make it talk over NIP46. 

Both of these tools support the new OAuth-like flow proposed by Pablo. Below you can watch a demo of how nostr-login (added to my fork of Snort) works with Nsec.app (or would work with any other nsecbunker).

What this all means is that people could join Nostr on the web, without installing extensions or mobile apps, with their keys stored non-custodially in the Nsec.app, and then could log in to other Nostr apps without copying their private keys. 

Demo: https://void.cat/d/JSWwYMTtbWxTDTLpe132Kr.mp4

Links:
Snort+nostr-login: https://snort.nostrapps.org
nsec app: https://github.com/nostrband/noauth
nsec app server: https://github.com/nostrband/noauthd
nostr-login: https://github.com/nostrband/nostr-login
 
 Which OS/browser? 
 Thanks, will look into this. Worked fine on Mac/Safari 
 Currently most apps expect a bunker string, so yes - you click Connect app in nsec.app and it shows the bunker url. 

If apps adopt nostr-login (or re-implement the OAuth-like flow themselves), users would just enter name@domain (@nsec.app or other nsecbunker domain) and get a popup to confirm the connection. 
 Oh yes on iOS it's early to celebrate - you need to enable Web Push API in Safari Settings -> Advanced -> Experimental, and then click 'Share' on nsec.app tab and click 'Add to homescreen' - that's the only way iOS allows push notifications to get delivered. Eventually the 'Settings' part will go away as the feature matures, but we'll need to instruct people about 'Add to homescreen' flow. 
 The create-account flow is described here: https://github.com/kind-0/nsecbunkerd/blob/master/OAUTH-LIKE-FLOW.md

Client (or nostr-login library) fetches nsec.app/.well-known/nostr.json, learns the npub and relay (of the nsec.app server - not the user), sends 'create_account' over NIP46, receives auth_url and shows the popup. Account is created by the auth_url tab (nsec.app or other nsecbunker). 

The code for all this is scattered over nostr-login, noauth and noauthd repos at github.com/nostrband 
 Done 
 Right now there is no way to delete keys in the app itself, you can clear all local data by clicking an icon to the left of tab url in your browser, then choose "Site data" or some such item, and then find "Delete" button. If you imported some real keys then you better have a copy of them in some other place. 
 Extension are not available on many mobile platforms. Also with remote signing you can give limited access to your keys to some server-side service that can't talk to your extension - i.e. import your tweets to Nostr, send DMs under your name, etc. Huge space of apps and services becomes viable.  
 Thanks! My bad, the surface of stuff I had to test these couple days was huge, Brave didn't make it to the list 😂 
 Your feedback is welcome! 
 All of you who generated new keys and claimed their preferred real usernames - I will make a 'transfer name' feature so that you could migrate your name to your real keys eventually.  
 Click add account choose advanced then import nsec. There are several reports here that it's not working in brave so I recommend you try signing up first to check with throwaway keys. Will look into the brave issues tomorrow  
 Will look into that! 
 Trustworthy is easily game able, same with new users, so if there is monetary incentive you will get bots inviting bots. Or scammy trustworthy people inviting bots.

We should just build tools to simplify social onboarding, turning it into a contest will result in abuse. I don't see a trivial way to avoid that. 
 Is there anywhere I can get a list of the most popular hashtags on nostr? 
 Maybe it's not there I quitely added it for Kieran couple months ago  
 Most social media has api’s for posting content but we don’t on nostr. I think the ability to... 
 To do that, we need nip46 remote signing, nobody will give the api or it's consumer their keys. And an accessible remote signing is coming soon... 
 When I wrote this I assumed people understood that nsecbunker holds private keys on behalf of its... 
 Stay tuned non custodial solution coming  
 Question: can nsec bunker custodian see your private keys? They store it to sign for you right? n... 
 Non custodial bunker in your browser is on its way, just fyi 
 Nsec.app 
 https://github.com/nostrband/noauth nostr:nevent1qqsph8z6frev38yg05847ww9ak85lraj6z8hkce5zcmqnr3dkejhs2gpz3mhxue69uhhyetvv9ujumn0wd68ytnzvupzqv6kmesm89j8jvww3vs5pv46hqm7pqgvpm63twlf9hszfqzqhz7aqvzqqqqqqyke9fxw 
 Wdyt? 
 Apologies, trust rank broke today, search results mixed up. Working on it 
 nostr:npub1xdtducdnjerex88gkg2qk2atsdlqsyxqaag4h05jmcpyspqt30wscmntxy When I try to find old note... 
 Oh it's been broken on the new site. Will fix, thanks! 
 Looking for a popular-level book on quantum physics, just a fun, informative read. Any suggestion... 
 Reading The beginning of infinity now, not too qf focused but fun and informative  
 I need to build a query to collect data from Nostr to understand if “social onboarding” actua... 
 This is a great idea. But calculating it based on your criteria won't be trivial:

> is the first follow of a new account

This can't be calculated with certainty, because clients can rearrange contacts, but most of them don't, so might be ok.

>  follows the new account within 24 hours

Not possible unless we track the full history of contact list editing by the advocates. We don't. 

> is author or recipient of first Note or DM with the new account

OK

> “engages” with new account “regularly” during a period

A bit complex but ok.

> is “trusted” by trust.nostr.band

OK.

If we replace the second condition with just 'Follows the new account' then it might work. But I can't promise to deliver this soon - quite complex endeavor with an obvious result. Do you really need the confirmation in numbers to keep building your onboarding tool? 
  @TheGuySwann Hi, https://guyswann.com/ is returning Database Error. Also sent you a DM - can you please check? Thanks 
 FORGIVE MY RANT … but I see TrustNet as little more than a glorified popularity contest. A less... 
 Great rant, thank you. I agree with most of the problems you're outlining.

First, on layers - I never suggested that we only need one single set of trust assignments. If we need several layers or facets - we could have more.

Second, on updating - manual or automated, any trust signal that is published will have to be updated periodically. UX might make it super smooth, but still. 

Third, on discrete flags - instead of 0-100 scale you're suggesting 0-1 scale, what does that change in principle? If humans are limited - let them only publish 0 and 100, and leave the full range to machines. 

Is there a preview of the NIP you're working on?  
 I'm not saying your work is a wasted effort, bcs right at the beginning of the paragraph that you're citing, I say 'naturally through friends' - that's exactly the best way to onboard someone and pass some trust you have to them. 

I watched your video, looks great and I fully support your effort. 

All I'm saying is that if someone has NO friends on nostr and joins nostr then they're indistinguishable from a bot. In fact, on Nostr they're much more likely to be a bot bcs it's an open network. And if they have to prove they're worthy of trust/attention by organic interaction then it will be hard bcs bots will be much more productive and persistent in attempts to gain trust by liking/commenting etc. For such people with no friends, doing PoW or paying fees seem like the only options to outpace bots.  
 I'm happy to participate in public discussions of this, better tools are very welcome! 
 Onboarding through friends is great in many ways so any tools that help with that are worth exploring  
 I'm not saying your work is a wasted effort, bcs right at the beginning of the paragraph that you're citing, I say 'naturally through friends' - that's exactly the best way to onboard someone and pass some trust you have to them. 

I watched your video, looks great and I fully support your effort. 

All I'm saying is that if someone has NO friends on nostr and joins nostr then they're indistinguishable from a bot. In fact, on Nostr they're much more likely to be a bot bcs it's an open network. And if they have to prove they're worthy of trust/attention by organic interaction then it will be hard bcs bots will be much more productive and persistent in attempts to gain trust by liking/commenting etc. For such people with no friends, doing PoW or paying fees seem like the only options to outpace bots.  
 We're starting to play with client-side trust ranking nostr:note13vpt4uqmfljhy9ql8rur23dpepkd8dkryxcp9mlf2wqjgxwj6puqnj3n6j 
 With an approach of 'each client publishes trust assignments then clients calculate trust ranks' private follows can be handled - your trust assignments would give non-zero values to privately followed users (if you so wish) and then others would use that info. Ofc if you want to keep your trust assignments 'private' that won't help.

Onboarding for new users is already a problem and requires some input from them - 'topics' etc, some seed from which we could work. Any seed will inevitably lead to some 'preferred' profiles, whose trust assignments can be used to calc trust ranks for this new user and show them something 'trustworthy'.

As for bootstrapping trust for new users - this has always happened naturally, through friend (someone invited you to join right?) or through genuine organic interactions (new user interacts with others and they reply and some trust is passed). But organic interactions take time, and also on Nostr it might simply be too costly to organically outpace bots that will try to gain trust the same way. That's the only place where I think PoW makes sense, also trust-bootstrapping services, or OpenTimestamp (onchain tx) with non-trivial fees spent (or a burn - but that's wasteful).  

Link to trust assignments note: nostr:note13vpt4uqmfljhy9ql8rur23dpepkd8dkryxcp9mlf2wqjgxwj6puqnj3n6j 
 New year holidays took way too long 
 It's a web browser with built-in nostr key management and some nostr client features.  
 nostr.band been down for the last couple of days

not getting advanced nostr search to work for m... 
 yeah apologies for the recent downtimes, been away from keyboard and that's when things start shaking, as usual. upgrading the relay hw setup to accommodate for the next year of nostr. 
 Is nostr.band proprietary software? 
 Server side is 
 That was awkward  
 The homepage isn't working? Any other page?  
 Could you please try clearing cache or something? I've tried it on Safari mobile now and everything looks fine. 
 Nice!
nostr:nevent1qqsxpmjcvz5ad76r0mnrll4gfdynpsf6snhq6lv3qh9qfrh3tw484gcpz3mhxue69uhhyetvv9ujumn0wd68ytnzvupzqla9dawkjc4trc7dgf88trpsq2uxvhmmpkxua607nc5g6a634sv5qvzqqqqqqyt20am2 
 One year ago on Dec 28 I bought the nostr.band domain and decided to focus on Nostr.

It's been an amazing journey! I've met incredible people, assembled a small team and we are building tools and products to help Nostr win. 

Thank you everyone who supported our efforts and used Nostr.Band!

We've made lots of updates to our advanced search features recently, and will be making them even better in 2024.

Excited to see what's going to be the next page of Nostr!  
 OMG that's awesome! 
 Thanks! Yeah there temporary were issues with a new backend that renders opengraph tags, should be fine now. 
 Thank you, it's a great motivation to keep building! I regularly take inspiration from the work you are doing! Being part of this community is the best experience of my professional life. 
 I was intending to long ago, but there are too many other important problems to work on so I probably won't any time soon. 
 The Nostr experiment will teach us that:

1. Entrepreneurship is HARD. Beware survivorship bias. ... 
 Oh please yes! 
 nostr is special, because it's a protocol that's built by us for us. however, we must also rememb... 
 And just as a reminder, you can find your favorite app or code repository on nostrapp.link and zap-split all contributors. 
 Another performance update in Spring v0.14

Most UI actions were taking 100+ ms of rendering. We managed to get this down to ~20ms and it's so much smoother now!

https://void.cat/d/QJ6cewFN3XchgHf6iCR7hz.mp4

Play Store: https://play.google.com/store/apps/details?id=com.nostr.universe
APK: https://github.com/nostrband/nostr-universe/releases/download/v0.14.1/spring-nostr-browser-v0.14.1.apk 
 Thanks for the write-up!

Questions:
- should username & email should be optional for create_account?  Clients shouldn't be forced to implement nip05 name selection, plus some bunkers might assign nip05 names from partners/different domains etc 
- create_account is only for signup? it could in theory work in exactly the same way for login - user enters their nip05 on the client, client sends create_account but the bunker just checks if such nip05 exists and does the auth
- Should bunker add itself to user's 31989 as handler for 24113? If it did, then if user changes their nip05 later, they could still login through a client with their new nip05 - client asks for nip05, checks .well-known of the new nip05 to see if it supports nip46 for this user, and if not - looks at 31989 to find the possible nip46 app for this user 
 > the `connect` request is sent to the user's pubkey

But to which relay? 31989 to find the domain which leads to .well-known with your nip46/relay. Or? 
 Doesn't look nice, third-party nip05 can change it at will and user has no control over it, 31989 is at least at user's control and is signed. 
 Although the way I described it, new nip05 would be the priority :)
Anyways, since we're adding to 31989 anyways we could do both and figure out later which works better. 
 Do you envision passing app name and icon to auth_url? So that bunker could display them when asking for confirmation, and also in the list of connected apps? Or should those be part of create_account/connect requests? 
 I agree those are forgeable, but having no app name/icon would hurt all normal users, while potential forgery would only hurt occasionally. 

I like your idea of using domain and nip05 of callbackUrl (I think you called it redirectUrl?). OAuth solves this by requiring app registration, but that not nostr way. 

Maybe we could require callbackUrl and redirect user to callbackUrl?token=accessToken which then has to be 'consumed' by the app with a new nip46 method to confirm it's identity? If callbackUrl doesn't belong to the attacker then they won't have the accessToken, doing this + your idea of using domain+nip05 could solve both naming and forgery. Anything wrong with this aside from complexity?

As for the native apps without deep linking support, they could stick to using bunker: links which are more cumbersome for users but don't have these issues. 
 The future!
nostr:nevent1qqsrmd7nm3hkuzzgh784092lg79yywuy8gdr07v6vlxunfsw45u2akcpz4mhxue69uhhyetvv9ujumn0wd68ytnzvuhsyg86np9a0kajstc8u9h846rmy6320wdepdeydfz8w8cv7kh9sqv02gpsgqqqqqqsdtx52d 
 Hi Niel! Apologies, somehow I missed this! Can we use this icon for nsec.app? 
 A big update on nostrapp.link!

If you consider njump's rendering of events a bit too technical, try nostrapp.link/<bech32>

1. It's very noob and mobile friendly.
2. It has custom rendering for many event kinds, supports 'alt' tags etc.
3. It has proper meta tags and is great for sharing on social/messengers.
4. It's fast - the event is pre-loaded on the server and thus displayed instantly.
5. It's not trying to render all the details of the event, and instead presents it as a 'preview' and encourages to choose an app to view it.
6. It suggests apps to view the event using nip89, not a pre-set list of apps, which means it's much more likely to suggest an app for unknown kinds.
7. No app has any preference, suggested app list is randomized.
8. Each app displays avatars of it's users.

Here is how a new 'video' 34235 events are rendered: https://nostrapp.link/naddr1qqr5u72rwuukxdqpp4mhxue69uhkummn9ekx7mqzyrt4xcnqhzx00ewv8l9ylq3ypu6zhsycwck08wz46htkteuvjhwukqcyqqqgtwc7qu42a

And here is a list of profiles: https://nostrapp.link/naddr1qqx4xmmxw3mkzun9ypzx2annqgsrx4k7vxeev3unrn5ty9qt9w4cxlsgzrqw752mh6fduqjgqs9chhgrqsqqqafs3ujm72

These improvements were long overdue, shout out to @mplorentz for pushing me to initiate them!

@Kieran maybe you could render links to njump or nostrapp.link for unknown kinds instead of these huge JSONs in Snort? 
 You mean "Choose an app for more info"  isn't clear? Big "Flare" box at the bottom is the suggested app.  
 Well if you clicked the '...' button at the corner of suggested app you'd see the full list. I guess we should turn it into "And N other apps" button or something like that. 
 Thanks! I agree Profile list meta tags should be fixed.

I'm not against viewing the raw json, I just want a convenient open-with button displayed nearby, or at least in the menu.  
 Amazing!
nostr:nevent1qqs9tsvza8x5t93jtyh3ktmwsdkxpwarcwstadlr0fc0rcxfvn5umzqpz4mhxue69uhhyetvv9ujuerpd46hxtnfduhsygqhw9adf5sw9fp9eks2yx2kyjs2ffeufa5htuttzkflepl6gmedtqpsgqqqqqqshtcssx 
 Amazing work! Nostr.band relay is now indexing 34235, they're searchable with nip-50 and on the site https://nostr.band/?q=kind%3A34235+series
 
 nostr:npub1ghzp7g0peac4lfkeegst3cqz546dk7a5n6twazvrf3nd432yddaqa3qtwq seems like nostr:naddr1qqxn... 
 It's not up to date bcs I published it, will delete my listing if you publish yourself @ElectronicMonkey 
 This link opens up, but the app icon link seems to be broken.
And I can see it the list of apps for long notes here https://nostrapp.link/naddr1qqxnzd3cxqmrzv3exgmr2wfeqgsxu35yyt0mwjjh8pcz4zprhxegz69t4wr9t74vk6zne58wzh0waycrqsqqqa28pjfdhz?select=true 
 More focused nostr apps yes please!
nostr:nevent1qqs0d8mdlw7v8dsk29p45gf5fup8rwflh5h8evg2xxqfkgv7tapevjgpremhxue69uhkummnw3ez6ur4vgh8wetvd3hhyer9wghxuet59upzp978pfzrv6n9xhq5tvenl9e74pklmskh4xw6vxxyp3j8qkke3cezqvzqqqqqqy33rg4v 
 During the last month or so I've pulled out most of Habla core into #ngine Soon any developer wil... 
 This is amazing! 
Do you plan to support some template system like mustache.js? Let's suppose you'd want to use ngine as a core for Ghost.org alternative - how hard could it be to provide similar level of customization/theming? 
 Amazing, a very important app!
nostr:nevent1qqstmzcm5zh6gx4t3mn2f0rywmpugpfpxz9zqkx792y5ml0un7hr98gpr9mhxue69uhhyetvv9ujuumwdae8gtnnda3kjctv9upzqla9dawkjc4trc7dgf88trpsq2uxvhmmpkxua607nc5g6a634sv5qvzqqqqqqyrmrrtf