!uZMQMQCuJdLENCAdsA:ipfs.io

browsers-and-standards

13941 Members
Implementation of IPFS protocol (and related, blocking or dependent technologies in web browsers, web standards.62 Servers

Load older messages


SenderMessageTime
1 Dec 2021
@mauve:mauve.moemauve
In reply to @_discord_215865804040699904:ipfs.io
I just watched, good stuff! I hope soon I won't have to ask the user to install ipfs and configure the node to interact with my website. edit it's also not secure at all
js-ipfs-fetch should be able to start an IPFS node right in your webapp, but the reliability isn't as good as running a go-ipfs node locally. Also not 100% sure how good the IPNS stuff is in a browser js-ipfs node.
17:20:55
@mauve:mauve.moemauveCould you elaborate on what you mean by it not being secure at all? (like, no access restrictions between web pages?)17:21:23
@_discord_215865804040699904:ipfs.ioSionoiS#5373 I'm ask the user to allow my website access to their node via http which means that If I'm a bad guy I could unpin/pin stuff or change their config. 17:23:46
@_discord_215865804040699904:ipfs.ioSionoiS#5373 * I'm asking the user to allow my website access to their node via http which means that If I'm a bad guy I could unpin/pin stuff or change their config. 17:23:53
@_discord_215865804040699904:ipfs.ioSionoiS#5373 defluencer.eth.limo 17:24:06
@mauve:mauve.moemauveAh yeah absolutely. Having a permissions prompt might be useful here. Not sure how fine-grained it should be since too much access control could annoy users and make them accept absolutely whatever.17:24:58
@_discord_215865804040699904:ipfs.ioSionoiS#5373 I think the blockstore could be separated per origin it would help with the pinning/unpin 17:25:41
@_discord_215865804040699904:ipfs.ioSionoiS#5373 We already have promts for webcam and mics so maybe one for ipfs IDK 17:26:18
@mauve:mauve.moemauveHow do you feel about the auto-pinning via IPNS stuff? I'm thinking it'd look like this: a website wants to save data to IPNS. They ask to POST into an IPNS directory with a given key name, the user agent prompts the user to allow or deny access. If allowed then data can be posted in there and the user can either have it auto-pinned to a remote service or locally via the MFS functionality17:27:39
@_discord_215865804040699904:ipfs.ioSionoiS#5373 DO you have an example? 17:28:57
@_discord_215865804040699904:ipfs.ioSionoiS#5373 any data a website would need to save like cookies? 17:29:22
@mauve:mauve.moemauve

This is a hypothetical at the moment.

I'm basing the UX from what the Beaker Browser did for Hyperdrive.

A concrete example would be a "photos" app for IPFS. The app would want to save to ipns://my-photos/photos/ where my-photos is the name for a Public key

17:30:12
@mauve:mauve.moemauve A user would drag and drop a photo into the app. Then the app would do a fetch('ipfs://my-photos/photos', {method: 'POST', body: formDataWithThePhoto}) APi call 17:31:00
@mauve:mauve.moemauve The user agent would then prompt the user "Such and such app wants to add data to ipns://my-photos, Allow/deny?" 17:31:29
@mauve:mauve.moemauve If allowed, any data saved to my-photos will be persisted in MFS locally 17:31:46
@mauve:mauve.moemauveThe user can then pin the full public key IPNS URL to a service somewhere (once IPNS pinning is a thing)17:32:02
@_discord_215865804040699904:ipfs.ioSionoiS#5373 Yes that could work. the problem I see is that it's never just one file. If you add a photo, some metadata, how would that work? 2 calls? 17:32:38
@mauve:mauve.moemauveYou can add a bunch of files with a FormData object17:33:28
@mauve:mauve.moemauvehttps://github.com/RangerMauve/js-ipfs-fetch#await-fetchipfsexample-method-post-body-new-formdata17:33:51
@_discord_215865804040699904:ipfs.ioSionoiS#5373 Ah yes that would fine I guess 17:34:00
@mauve:mauve.moemauveBut once you have been granted access to that IPNS domain, the website should be allowed to do whatever with it17:34:11
@mauve:mauve.moemauveKinda like how with camera prompts you can get acess to a camera for the rest of the session or forever17:34:37
@mauve:mauve.moemauveAt the moment (at least in Agregore) there's no prompts at all though and it's a free-for-all. :P17:35:09
@_discord_215865804040699904:ipfs.ioSionoiS#5373 That is good I can see it work very well. 17:35:28
@_discord_215865804040699904:ipfs.ioSionoiS#5373 What about pubsub any ideas? 17:36:26
@mauve:mauve.moemauveThe latest thoughts I had on that are here: https://github.com/AgregoreWeb/agregore-browser/issues/110#issuecomment-92520516517:37:19
@mauve:mauve.moemauve tl;dr using the EventSource API and a custom pubsib:// protocol. 17:37:31
@mauve:mauve.moemauve You can subscribe to events using the EventSource API, and use POST to a pubsub://Some_Topic_Here to broadcast events out 17:38:06
@_discord_215865804040699904:ipfs.ioSionoiS#5373 That would be fantastic! 17:39:21
@mauve:mauve.moemauveCurrently my IPFS work is focused on making a mobile version of Agregore and deploying it to a mesh network, but if anyone would be interested in getting changes into js-ipfs-fetch I'd be more than happy to help them figure it out. 😁17:40:37

Show newer messages


Back to Room ListRoom Version: 6