You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IN this we'r discussing about methods for VALIDATING the password that were pass by him;
73
73
-It just return true & false value weather you login or not !!
74
74
75
+
-----------------NEW--------------------
76
+
@SECTION: USER MODEL & SIGNUP
77
+
@TITLE: CREATING JWT TOKEN
78
+
@LOCATION: 🗃️models/user.js
79
+
@OVERVIEW:
80
+
-🎯first Need to go in .env file
81
+
-🎯Need to mention JWT_SECRET & JWT_EXPIRY
82
+
-🎯NEED to require 'jsonwebtoken' with Id which easy querry to DB
83
+
-🎯then define methode "getJwtToken" with optionaly Asynchronously but don't use
84
+
-🎯create function into it
85
+
-🎯generate token via 'sign'
86
+
-🎯pass id REMEMBER {id:this._id} first id(we'created) & : + this._id(generated via mongoose & we'r accessing);
87
+
-🎯By the term it mean: whenever save data in mongodb + automatically generate (._id(field- This is not JSON it's BSON Field)) + Access via only only _id underscore ID O.w NOT
88
+
-🎯OPTIONAlY YOU Can PASS LIKE THAT ALSO : email:this.email
0 commit comments