Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 03 11:56
    Emad-salah commented #1170
  • Dec 03 11:50
    Emad-salah synchronize #1170
  • Dec 03 03:20
    aethiop closed #1163
  • Dec 03 02:39
    amark commented #1167
  • Dec 03 02:39

    amark on master

    make change to lib/unset.js (#1… (compare)

  • Dec 03 02:39
    amark closed #1167
  • Dec 03 02:37
    amark commented #1163
  • Dec 03 02:35
    amark commented #1167
  • Dec 03 02:20
    amark commented #1170
  • Dec 02 16:48
    u007 commented #1173
  • Dec 02 16:47
    u007 commented #1173
  • Dec 02 16:47
    u007 closed #1173
  • Dec 02 16:44
    u007 commented #1173
  • Dec 02 16:29
    u007 opened #1173
  • Dec 02 12:39
    fsvieira opened #1172
  • Dec 01 23:00
    amark commented #1167
  • Dec 01 21:21
    Oxey405 opened #1171
  • Nov 30 15:07
    Emad-salah opened #1170
  • Nov 29 22:49
    fsvieira edited #1168
  • Nov 29 22:47
    fsvieira commented #1168
libensveto
@libensveto_twitter
listened to this, https://changelog.com/podcast/236 , trying to dig up "mark inspiration" while doing a coding sprint . Noticed the hosts trying to pick apart the long term viability of gun towards then end, but still standing here today, makes me v proud
Mark Nadal
@amark
@libensveto_twitter awwe, you're so kind. My most recent podcast was the dabit3 episode.
It had a nice summary of GUN in it.
sua yoo
@SuaYoo

added the example to the wiki, thanks!

is there a way to manually add/trigger an error from gun middleware? i'm using bullet-catcher to verify JWTs, but since it fails silently, i cant tell the client to ask for another JWT. hoping for something like this:

if (isValid(msg)) {
    to.next(msg)
} else {
    // context.err = 'expired token'
    // or
    // msg.err = 'expired token'
    // or...
    // context.throwError('expired token)
}
sua yoo
@SuaYoo
heres the code if anyones curious, pretty straightforward jwt implementation: https://github.com/SuaYoo/gundb-react-express-auth-example/pull/1/files pretty excited about the possibility of getting rid of auth0 in my apps if this works ;)

i suppose i can do something like

if (isValid(msg)) {
    to.next(msg)
} else {
    gun.get(`~${appPubKey}`)
        .get('errors')
        .get(msg.headers.userPubKey)
        .put('invalid token')
}

but that feels...weird? since anyone would be able to read this error? still wrapping my head around gun-space

YarnBall
@yarnball
@SuaYoo this looks great! Does your repo handle registering an already existing username?
sua yoo
@SuaYoo
yep the logic is in the client https://github.com/SuaYoo/gundb-react-express-auth-example/blob/main/client/src/Login.js#L62 but without bullet-catcher/access tokens i believe someone could peer using their own app and bypass the check, if thats a concern
YarnBall
@yarnball
Oh I see. And if they "register" their user while offline, it would still know to reject it being created?
1 reply
Mark Nadal
@amark
@SuaYoo context.on('in', {'@': msg['#'], err: "error!"})
1 reply
... # is message ID, @ is ack reply to message ID
BBL
deathg0d
@deathg0d

@amark It sends to a remote server that contains the following code:

import Gun from 'gun';
import "gun/nts";
import "gun/lib/radix";
import "gun/lib/radisk";
import "gun/lib/store";
import "gun/lib/rindexed";

const PORT = 8080;
const HOST = "0.0.0.0";
var http = require('http');
var server = http.createServer();
var gun = Gun({ web: server, axe: false });

server.listen(PORT, HOST, () => {
  console.log(`Server listening to localhost:${PORT}/gun`);
});

This is inside a docker container. The routing and ssl on the server is handled by nginx proxy manager (which runs in another docker container). And as we discussed, it is working fine for data that arrive in realtime. The client app is not able to fetch already existing data from this server.

1 reply
Monknow
@Monknow
Hi! I was doing the todo example on the docs, but the console is giving mae this warning whenever I type something: Warning: AXE alpha became super slow & laggy, now in testing only mode!. So I decided to not import AXE and that got rid of the problem. However, should I import AXE anyways or not? Thanks in advance(By the way, your hair is awesome!)
Connor Davis
@connor-davis
@amark I managed to get my auth working using keypairs no :)
I might like this method alot
rrmckinley
@rrmckinley:matrix.org
[m]
https://www.youtube.com/watch?v=KMtrY6lbjcY Smarter Every Day YouTube channel (10 million follows) is starting a zero knowledge app and they are looking to partner @amark
Nicolas Frati
@jnfrati
Hey guys! I was making a little research of GUN, and found this video of Mark talking about AXE a couple of years ago. Wanted to know what was the state of that and where I can learn a little bit more. I've found AXErunners.com but not sure if it's the same protocol. Sorry if it's an ignorant question
sua yoo
@SuaYoo

is there a way to manually add/trigger an error from gun middleware? i'm using bullet-catcher to verify JWTs, but since it fails silently, i cant tell the client to ask for another JWT

@SuaYoo context.on('in', {'@': msg['#'], err: "error!"})

updated the example here to implement marks suggestion if anyones curious: https://github.com/SuaYoo/gundb-react-express-auth-example/pull/1/files

Connor Davis
@connor-davis
https://youtu.be/LDG9T2hN7i0 As you all know I have been working on an app, Here is the Demo Video
Mark Nadal
@amark
@deathg0d will you do me a favor and... in NodeJS gun will try to pull all the NodeJS modules automatically, try dropping the extra import statements, and see if that changes anything? (If not, then try turning AXE back on). If these last checks don't work then I don't know what is going on, and maybe would need to screenshare or something.
@Monknow <3 thanks :) :) :) . AXE in browser is experimental and not necessary, if you remove it tho, you need to add/specify peers GUN([peer1, peer2, etc.
@connor-davis :fire: yay
@rrmckinley:matrix.org nice tip off! Have any connections to him?
@jnfrati we announced before them and are not related to them. AXE is like 40% complete, if you want to help build the last 60% we have quite a few "PANIC" tests we simulate it under to test against. Curious?
@SuaYoo :pray: thank you! Did it work for you too?
@connor-davis Nice, can I tweet about this?
rrmckinley
@rrmckinley:matrix.org
[m]
@amark: no connection no. It is left-field for them and makes me think there may be a tipping point in interest in decentralization and zero knowledge
achilles
@achilldotes_twitter
Hey folks, I have a couple questions about gun. When I use sessionStorage: true with gun.user, I notice that my alias is now encrypted when I revisit the page. Which now means I have to use SEA to decrypt it. If this is false, feel free to let me know. However, what should I decrypt it with? User.is only has 3 options, alias, epub, and pub. Thanks for your help.
libensveto
@libensveto_twitter
any one in genz mafia? cant find it in my discord anymore and can only guess i got kicked for shilling
Manuel Etchegaray
@Manuel-777
@amark hey man! Im having a problem with users, maybe you found a better way of doing this, but, what is the defacto, best and proper way of making user accounts recoverable using Gun? The passphrase/hint method is quite bad to be honest, people forget just details of their passwords like a number or an uppercase, and the hint unless it contains the whole password, does not help in those situations. I have had a LOT of complaints with this particular issue.. Have you found a solution for that, or rather, an alternative?
mimiza
@mimiza
@amark Do you have some time? Can you please fix the issue #1137 ?
Mark Nadal
@amark
@achilldotes_twitter interesting that also seems like a bug.
@libensveto_twitter I was there a long time ago. What were you "shilling"?
@Manuel-777 the problem is no other system even comes comparably close to any method, at all :( so something is better than nothing. Luckily, @aethiop built a 3FA method too! https://twitter.com/marknadal/status/1427715775838572545
@mimiza agreeeeeeed, after being gone on legal stuff for the few weeks, I've back been in docs world and then Brave said they'd review my SecureRender proposal. I need to fix this for you, can it be done after SecureRender or no?
mimiza
@mimiza
@amark if it is possible I want it to be fixed soon, but it's up to you to arrange your time. There are certify unit tests and some bus delayed for weeks now. I just want to finish them.
libensveto
@libensveto_twitter
@amark myself mainly, they get abit uptight if you do it in the wrong channel or start asking for help
Oscar Hilton
@oscarhilton
Major breakthrough in my understanding of GUN! Thank you everyone to helped me out!
@amark Konva is a canvas library that makes developing UIs in the canvas super simple! :)
mochic
@mochic
Hey so I’ve made a lot of progress since my last question. I have each gun instance listening to nodes and waiting for changes on certain nodes but I’m worried about the network being flooded with malicious “put” operations, making it hard to get data we actually want to see. I suppose I could maintain a blacklist for each client but I feel like that might spiral out of control since creating a new user is so easy that the blacklist would become untenable in size even via a complex implementation. Any suggestions? Is there any clever way for me to embed metadata in property names to use lex to filter out data from “bad” sources or is implementing an adapter more helpful for me here?
Barłomiej Bąk
@dweorh_twitter

hey guys, I have a pretty weird issue with .map()

gun.get('dict').map((data, key) => {
  if (data == 1) 
    return { data, key, status: 1}
else 
  return {data, key, status: 2}
}).once({ data, key, status } => {
  console.log(data, key, status)
})

that's just an example, thing is that pretty often .map() does not call .once(). Any idea why?

libensveto
@libensveto_twitter
Mark Nadal
@amark
@libensveto_twitter :+1:
@oscarhilton (?)
@mochic Iris' Web of Trust is what fixes this. Don't worry tho, launch your app first, do not over-engineer it, you can integrate Iris and stuff later.
@dweorh_twitter hmm, there are minimal tests for filter and transform functions in map. if you just do map().once((data,key) => { if(data === 1){ ... are there any issues?
@libensveto_twitter w0000 nice homepage!!! Clicking "start" didn't do anything tho
1 reply
libensveto
@libensveto_twitter
@amark yep havnt linked it up yet
Ronald Prato
@Ronald-Prato
Hey there! i've been reading the docs all day and i'm still having a question about delete data. What if i have a medium-deeply nested schema? if i set null to a node which have other relationships those get deleted as well ?
Wasis Haryo Sasoko
@yokowasis
@Ronald-Prato no.
kristof de spiegeleer
@despiegk
trying to figure out how to use gun with typescript, but the examples I found don't work, anyone an idea, would be great
deathg0d
@deathg0d
@amark Is there a way to log get requests on a node.js gun server?
yash deore
@yash-deore
How long does a gun js server hold on to data .
Asking because I made a chat app but some hours later it did not show the previous messages .
simjnd
@simjnd:matrix.org
[m]
Did you have a relay node set up or did you just use the browser's local storage?
mossmanpete
@mossmanpete
has anyone combined RxJS with gun?
Adam
@adam-12:matrix.org
[m]
@yash-deore i think the one click heroku peers delete data every 15 mins
rococtz
@rococtz:matrix.org
[m]
@yash-deore: if you are using some community gun relay (or even yours) that happen to be deployed on heroku free tier, the storage will be wiped after some minutes of inactivity. If you are using some real production environment it will be stored for ever.
@mossmanpete RxJS with Gun is a really good idea since they are both working with streams, definitely doable
Mark Nadal
@amark
@Ronald-Prato @despiegk @yash-deore @simjnd:matrix.org 👋👋
@rococtz:matrix.org 👏
@adam-12:matrix.org 👏
@simjnd:matrix.org 👏