Skip to content
This repository was archived by the owner on Aug 30, 2021. It is now read-only.

Commit 4dd90f1

Browse files
committed
Fixing PR
1 parent 6dbe996 commit 4dd90f1

File tree

4 files changed

+17
-22
lines changed

4 files changed

+17
-22
lines changed

app/models/user.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,20 @@
33
*/
44
var mongoose = require('mongoose'),
55
Schema = mongoose.Schema,
6-
crypto = require('crypto'),
76
scrypt = require('scrypt'),
87
_ = require('underscore'),
98
authTypes = ['github', 'twitter', 'facebook', 'google'];
10-
11-
9+
1210
/**
1311
* User Schema
1412
*/
1513
var UserSchema = new Schema({
1614
name: String,
1715
email: String,
18-
username: {type: String, unique: true},
16+
username: {
17+
type: String,
18+
unique: true
19+
},
1920
provider: String,
2021
hashed_password: String,
2122
facebook: {},
@@ -91,7 +92,7 @@ UserSchema.methods = {
9192
* @api public
9293
*/
9394
authenticate: function(plainText) {
94-
return scrypt.verifyHashSync(this.hashed_password, plainText);
95+
return scrypt.verifyHashSync(this.hashed_password, plainText);
9596
},
9697

9798

@@ -104,10 +105,10 @@ UserSchema.methods = {
104105
*/
105106
encryptPassword: function(password) {
106107
if (!password) return '';
107-
var maxtime = 0.1;
108-
return scrypt.passwordHashSync(password, maxtime);
109-
//return crypto.createHmac('sha1', this.salt).update(password).digest('hex');
108+
109+
var maximumTimeout = 0.1;
110+
return scrypt.passwordHashSync(password, maximumTimeout);
110111
}
111112
};
112113

113-
mongoose.model('User', UserSchema);
114+
mongoose.model('User', UserSchema);

config/express.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ var express = require('express'),
88
config = require('./config');
99

1010
module.exports = function(app, passport, db) {
11-
app.set('showStackError', true);
11+
app.set('showStackError', true);
12+
13+
//Prettify HTML
1214
app.locals.pretty = true;
15+
1316
//Should be placed before express.static
1417
app.use(express.compress({
1518
filter: function(req, res) {

gruntfile.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ module.exports = function(grunt) {
2727
options: {
2828
livereload: true
2929
}
30-
},
31-
test: {
32-
files: '*',
33-
tasks: ['test']
34-
}
30+
}
3531
},
3632
jshint: {
3733
all: ['gruntfile.js', 'public/js/**/*.js', 'test/**/*.js', 'app/**/*.js']

package.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"mongoose": "latest",
2424
"connect-mongo": "latest",
2525
"connect-flash": "latest",
26+
"scrypt": "latest",
2627
"passport": "latest",
2728
"passport-local": "latest",
2829
"passport-facebook": "latest",
@@ -36,14 +37,8 @@
3637
"forever": "latest",
3738
"bower": "latest",
3839
"grunt": "latest",
39-
<<<<<<< HEAD
40-
"grunt-cli": "latest"
41-
=======
4240
"grunt-cli": "latest",
43-
"grunt-env": "latest",
44-
"grunt-bower-task": "latest",
45-
"scrypt": "latest"
46-
>>>>>>> 71365db8398cfc2c1d40aceef4cb25927109eb10
41+
"grunt-env": "latest"
4742
},
4843
"devDependencies": {
4944
"supertest": "latest",

0 commit comments

Comments
 (0)