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
-🎯ForgotPasswordToken It just Normal String Nothing more than that don't consider as a jsonwebtoken
113
+
-🎯Need to Stored this String Into DATABASE itself & send to frontend somebuddy else
114
+
-🎯use crypto package take Refference of 2nd last link
115
+
-🎯we can perform simply No need to woryy on 'createHash,digest,update' & all stuff just go & simply stored like this.forgotPasswordExpiry = forgotToken it's OK !! No Problem
116
+
-🎯But,OPTIONAlY Moving one step ahead BEFOUR one Read about last wikipedia Link
117
+
-🎯About ref link
118
+
it Generate STRING which "fix in size" + find message only via "Bruit Force" which take long years & info not that much valuable + So in order to Resolve "Cryptographic_hash_function" Need of it;
119
+
120
+
121
+
-@PROCESS
122
+
^ Generate a long and random String
123
+
[nanoid,randomstring,uuid]
124
+
^ But😗, we'r using CRYPTO not any one of them it just for knowledge
125
+
^ we'don't have to install it come with node itself;
126
+
^ take Refference of last two below link study perpose & with the help of that createHash update & digest
127
+
128
+
129
+
----------------------------SECTION
130
+
131
+
@TITLE: USER ROUTES AND POSTMAN
132
+
@LOCATION: 🗃️MODEL/user/
133
+
134
+
🔺-"/forgotPassword "- request an email How to reset Password +
135
+
🔺-"/password/reset/:token" - The whole idea behind this Grabbed this UNIC string(via :token) just created at earlier Via CRYPTO
136
+
& want to Grabbed this "URL" itself if "STRING" Matches with my DATABASE STRING So everything reset in backend itself; this is how it work;
137
+
Note: ALSO Allow PASSWORD Body itself
138
+
🔺- Need All user info "/"
139
+
🔺- "/password/update" && "/user/update"
140
+
141
+
-----------------------------SECTION
142
+
143
+
@LOCATION: 🗃️CONTROLLER/user.js
144
+
@TITLE:SIGNUP A USER & COOKIE
145
+
146
+
/*SEND Cookie Value
147
+
-🎯Optionally You can send msg Hey, user is created Go & Login
148
+
-🎯But,here once Registerd then want send HIM cookie token & GRABBED It That's convection
149
+
-🎯Now able to access Methods Now that we done on Model/user "getJwtToken" it'll give me token
150
+
-🎯want set some options & throw it on "Cookie"
151
+
-🎯Why Json for mobile perspective that's why you see easily token on web But.
152
+
153
+
Cookie token we need use frequently So create 🗃️utils/cookieToken/
0 commit comments