Solves issue #5

This commit is contained in:
Luis Fernando Molina committed 2018-10-23 10:31:07 +02:00
1 parent 1f1f4ae37b
commit 9275e0fd34
4 files changed
+2701 -12

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ const Schema = mongoose.Schema
const userSchema = new Schema({
authId: String,
referrerId: String,
creationDate: String,
creationDate: Number,
alias: String,
firstName: String,
middleName: String,
+2696
View File
File diff suppressed because it is too large. Load diff
+2 -1
View File
@@ -17,6 +17,7 @@
"jsonwebtoken": "^8.3.0",
"jwks-rsa": "^1.3.0",
"lodash": "^4.17.10",
"mongoose": "^5.2.12"
"mongoose": "^5.2.12",
"npm": "^6.4.1"
}
}
+2 -10
View File
@@ -457,20 +457,12 @@ function authenticate (encodedToken, callBackFunction) {
}
let localDate = new Date()
let creationDate = new Date(Date.UTC(
localDate.getUTCFullYear(),
localDate.getUTCMonth(),
localDate.getUTCDate(),
localDate.getUTCHours(),
localDate.getUTCMinutes(),
localDate.getUTCSeconds(),
localDate.getUTCMilliseconds())
)
let creationDate = localDate.valueOf()
let newUser = new User({
alias: alias,
authId: authId,
creationDate: creationDate.toISOString(),
creationDate: creationDate,
email: email,
emailVerified: emailVerified,
roleId: '1'