52 ms·
Is there a guide for handling things like auth and permissions with gun?
by IanCal 10y ago
Is there a guide for handling things like auth and permissions with gun?
- marknadal 10y agoRight now the standard way is to have a server that you proxy writes (the same setup you would have with Postges or Mongo) to, so I would refer you to things like Passport and stuff. We plan on adding our own system, however it will be based on a fully P2P setup. Where every user has public/private keys and the server does not have access to that private key. We have a couple prototypes but we aren't security experts so we want to be careful and get some auditing before we publish it as a tool. Finally, if you just want to control request/response, then there is a generic callback for that that gives you the ability to reject requests. See https://github.com/amark/gun/blob/master/examples/express-auth.js https://github.com/amark/gun/blob/master/examples/express-au... as an example, note that we may be changing this in the future though.