Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 19 2018 15:13
    mfcava closed #12
  • Nov 27 2017 12:21
    juanitoddd opened #77
  • Nov 27 2017 10:15
    Travis waterlock/waterlock#153 broken (223)
  • Nov 27 2017 10:10
    juanitoddd opened #153
  • Oct 29 2017 04:14
    suecher opened #76
  • Oct 23 2017 07:35
    funyx synchronize #18
  • Oct 23 2017 07:28
    funyx synchronize #18
  • Oct 21 2017 06:23
    funyx synchronize #18
  • Oct 21 2017 05:02
    funyx synchronize #18
  • Oct 19 2017 06:55
    funyx opened #18
  • Sep 19 2017 08:37
    pocesar closed #77
  • Aug 26 2017 04:52
    Travis waterlock/waterlock#152 errored (222)
  • Aug 26 2017 04:48
    frankwong opened #152
  • Aug 23 2017 16:37
    nobitis opened #75
  • Aug 23 2017 15:35
    nobitis opened #151
  • Aug 07 2017 18:30
    senica synchronize #61
  • Aug 01 2017 08:58
    emreyanik opened #74
  • Jun 12 2017 02:23
    Travis waterlock/waterlock#150 errored (221)
  • Jun 12 2017 02:09
    afidosstar opened #150
  • Jun 10 2017 16:23
    lcborn4 opened #73
danieljeyes
@danieljeyes
one more question, I noticed with fresh install, if you for example post on /auth/login rather than get, this crashes the sails app. is there something that can be done to prevent this from crashing
danieljeyes
@danieljeyes
Hi all, is waterlock working well with the latest sails version? 11.3
Sunny Patel
@sunnypatel
Hey guys, has anyone encounter waterlock crashing entire sails app because it tries to create a new user but fails validation?
Benedict Chen
@benedictchen
hey guys, i have no idea how to use waterlock
i've set things up, i can login via /auth/login by sending a POST request
but the stuff it sends back is not what i expect
there is no JSON web token
and worse is that it sends back the password in the payload
{
"id": 3,
"createdAt": "2015-11-30T06:20:58.000Z",
"updatedAt": "2015-11-30T06:20:58.000Z",
"auth": {
"password": "$2a$10$3JqupjfQsnwinnAEuPHZwOm37TiBADabX2SGzpSWS9f6i1oVsC4de",
"email": "abc@abc.com",
"id": 1,
"createdAt": "2015-11-30T06:20:58.000Z",
"updatedAt": "2015-11-30T06:20:58.000Z",
"resetToken": null
}
}
{
  "id": 3,
  "createdAt": "2015-11-30T06:20:58.000Z",
  "updatedAt": "2015-11-30T06:20:58.000Z",
  "auth": {
    "password": "$2a$10$3JqupjfQsnwinnAEuPHZwOm37TiBADabX2SGzpSWS9f6i1oVsC4de",
    "email": "abc@abc.com",
    "id": 1,
    "createdAt": "2015-11-30T06:20:58.000Z",
    "updatedAt": "2015-11-30T06:20:58.000Z",
    "resetToken": null
  }
}
Register isn't much bettr
{
  "auth": {
    "user": 6,
    "password": "$2a$10$vY7R1cUMktsFHVvgXBHEvOB4IjEQZhwxyLl/DqJeW/m1KQUy8CQpW",
    "email": "ab123c@abc.com",
    "resetToken": null,
    "id": 4,
    "createdAt": "2015-11-30T06:58:50.000Z",
    "updatedAt": "2015-11-30T06:58:50.000Z"
  },
  "id": 6,
  "createdAt": "2015-11-30T06:58:50.000Z",
  "updatedAt": "2015-11-30T06:58:50.000Z"
}
@sunnypatel Yes, i just experienced that
you have to use some workaround i found on Stackoverflow
stick this in AuthController.js

 module.exports = waterlock.waterlocked({


  register: function(req, res) {
    var params = req.params.all();
    var def = waterlock.Auth.definition;
    var criteria = {};
    var scopeKey = def.email !== undefined ? 'email' : 'username';

    var attr = {
      password: params.password
    }
    attr[scopeKey] = params[scopeKey];
    criteria[scopeKey] = attr[scopeKey];
    waterlock.engine.findAuth(criteria, function(err, user) {
      if (user) {
        return res.badRequest({
          error: 'User already exists'
        });
      }
      else {
        waterlock.engine.findOrCreateAuth(criteria, attr, function(err, user) {
          if (err) {
            return res.badRequest(err);
          }
          delete user.password;
          return res.ok(user);
        });
      }
    });
  },

});
this stuff is so damned frustrating, thinking about just implementing authentication from scratch
Travis Webb
@tjwebb
@benedictchen I just wouldn't use Sails at all, that's the main problem. See: https://github.com/balderdashy/sails/issues/3429#issuecomment-165004024
Mehdi Aïssani
@maissani
@tjwebb You are now working on https://github.com/trailsjs/trails please stop making some advertising on your rival project that you own, if you want people join your project please ask us to create new packages that will work with your framework.
Open-Source is sharing, this is not making the war with an other framework, just because you feel angry about it, because @mikermcneil push you out of Sails project.
I know that ES6 is amazing, i know that your project is based on clean coding, best practices and other good stuff, but please note on this link that even Babel or other transcoding stuff are fully working with ES6, ES6 is not stable at the moment to write productions projects with the risk of core functions changes, 0 day bugs and other stuff like this.
Travis Webb
@tjwebb
I understand the note about advertising, and ill try to communicate in a different way going forward. On es6, its supported natively by node4 LTS (2.5 years of support) and node5, so your claim about it being unstable is not accurate.
Mehdi Aïssani
@maissani
@tjwebb https://kangax.github.io/compat-table/es6/ Look at those functionality tables. Even if node4 is LTS etc... if the implementation of ES6 is not full, you may have not access on all ES6 functions yet or some functions will be change along the ES6 implementation, so there is a risk of unstability when coding on ES6 at the moment.
I agree with you about use ES6 but not for a framework at the moment because of engines that don't support it at 100%.
You can create it, develop it, making it grow but, don't ask people to put it on production for the moment.
I love SAILS and I love ES6, i think your project will have a future, i will watch it closely and as soon as node4 will be at 100% of implementations , I will use your framework, making some proof of concept and enjoy it.
Travis Webb
@tjwebb
@maissani difference of opinion. no one will support 100.00% es6 natively for years. that doesn't mean you can't start taking advantage of it now. the features in node4 won't change.
and we have dozens of es6 applications running in production. so do many large companies (some of whom are our clients). I'm perfectly happy to recommend running es6 in production. it's not some experimental draft anymore, it is javascript.
Mehdi Aïssani
@maissani
@tjwebb I agree with you
Benedict Chen
@benedictchen
@tjwebb, Your trails project has no testing, is poorly documented, and has no style guide. Not to say Sails is much better, but at least it's mature and I've already written a good amount of code using it. If you want to be taken seriously, at least have more than 2 unit tests in your whole project.
Travis Webb
@tjwebb
@benedictchen if you look at our roadmap, the project is pre-release. we're releasing 1.0-alpha on January 8, and 1.0-final in April. across all our modules we have over 100 unit tests, and continue to add more every day. our entire company is invested in building trails, and the "work zone" appearance of it will recede quickly starting week after next.
we're launching it the week of the 11th, and I'll be giving talks on it in Detroit, Miami, and LA of that week. if you're in any of those cities, come hang out with your local js group, and I'll be there :) I appreciate the thoughts, and we're obviously in agreement here. the only thing to keep in mind is that, yes, Sails has been around for 3 years and Trails was started 5 weeks ago. we're hell bent on making Trails better, and we can have a different discussion once it's released
Cory Collier
@corycollier
Hey there.
I'm trying to find any documentation on using multiple auth providers
anyone know where I can RTFM ?
Cory Collier
@corycollier
Namely, I'd like to be able to use multiple LDAP servers for authentication
ryd0rz
@ryd0rz
I got JWT working recently in my own branch... it's not hard
MeloGit
@MeloGit
Hi everybody, i'm a beginner in using waterlock and i want to how can i do override a beforeCreate function of waterlock model auth
Can Tecim
@cantecim
just place a function into auth model
@MeloGit waterlock automatically calls your beforeCreate function after hashing password
MeloGit
@MeloGit
Thanks @cantecim i 'll try it
MeloGit
@MeloGit
@cantecim it works
Now i'm trying through associations with 3 tables. is it possible?
3tables and one junction table
MeloGit
@MeloGit
Hi everybody, if it's possible to add a groupby in a populate function
Alexander
@damongant
I'm pretty new to Sails, is it just me or is there no mention on the docs what default method waterlock puts in my controllers?
like, that's a little too much magic maybe?
MeloGit
@MeloGit
@DamonGant for figuring out how default waterlock controllers work you have to look a folder waterlock in node_modules
Can Tecim
@cantecim
are there any one who will accept PR ?
jdell64
@jdell64
Howdy folks!
quick question for you, how would I lock down the path /auth
as in ... i don't want everyone to get all my users' info
Roberto Wesley Overdijk
@RWOverdijk
What does waterlock do more than our hook? https://github.com/SpoonX/sails-hook-authorization
Which is just... auth, email and... No, that's it.
Well, there's a service... And it's jwt. I'm curious