File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 2
2
NODE_ENV = ' dev'
3
3
4
4
# Connection string URI for your MongoDB database
5
- DATABASE = ' mongodb://ae38f3d8f1f51f8ba6d8b02610d6b391:neel12@6a.mongo.evennode.com:27017,6b.mongo.evennode.com:27017/ae38f3d8f1f51f8ba6d8b02610d6b391?replicaSet=eu-6 '
5
+ DATABASE = ' '
6
6
7
7
# Port that this app runs on
8
8
PORT = ' 3000'
Original file line number Diff line number Diff line change @@ -243,11 +243,11 @@ schema.methods.checkPassword = function(password) {
243
243
244
244
// Token stuff
245
245
schema . methods . generateEmailVerificationToken = function ( ) {
246
- return jwt . sign ( this . email , JWT_SECRET ) ;
246
+ return jwt . sign ( this . email . toJSON ( ) , JWT_SECRET ) ;
247
247
} ;
248
248
249
249
schema . methods . generateAuthToken = function ( ) {
250
- return jwt . sign ( this . _id , JWT_SECRET ) ;
250
+ return jwt . sign ( this . _id . toJSON ( ) , JWT_SECRET ) ;
251
251
} ;
252
252
253
253
/**
@@ -261,7 +261,7 @@ schema.methods.generateAuthToken = function(){
261
261
*/
262
262
schema . methods . generateTempAuthToken = function ( ) {
263
263
return jwt . sign ( {
264
- id : this . _id
264
+ id : this . _id . toJSON ( )
265
265
} , JWT_SECRET , {
266
266
expiresInMinutes : 60 ,
267
267
} ) ;
You can’t perform that action at this time.
0 commit comments