Closed kidsil closed 7 years ago
I don't think sails-dynamodb is generating any IDs. mongo has mongo ids, dynamodb doesn't have that
So the main question is what should I modify on the User.js Model to make Facebook login work (I've tried autoIncrement and similar things, sadly it still won't work)
I'd do something that will set an id like this: User.js
module.exports = {
connection: 'dynamodb',
autoPK: false,
attributes: {
id: 'string',
},
beforeCreate: function(values, cb) {
values.id = values.id || generateRandomId();
return cb();
}
Details: ValidationException: One or more parameter values were invalid: Type mismatch for key id expected: N actual: S
Never mind I think I had to clear my localhost cookies...
I used uuid.v4()
instead of generateRandomId()
When trying to login via Facebook (using passport-facebook) I'm getting the following error:
This doesn't happen when using mongodb, so it must have something to do with IDs not being automatically generated, I'm not entirely sure though.