the thing is the way you make us understand the concept are so good. In previous video you thought how to implement cookies but i never got time to watch the whole video but i created a logic by myself to delete the cookie id when a user clicks logout such that it redirects me to the login page again. Thank you so much and keep up the good work!!
10:38 you changed the token. the email was changed, the new token contains Tcf90 at last but at 10:39 (HXfCY at last) there is a cut in video where you changed it, i was getting the glitch and sure you too but you not explained that in video and directly changed something.
Very nicely explained Piyush. ! question though, in case of refresh token does the secret on the server changes since the payload information would remain the same ? Wonderful JWT explnation
Brother! as we are storing tokens with cookies. Someone can copy that token and log in, as you already demonstrated. Is it a secure way? कृपया मार्गदर्शन करें..
There is no login if you changed the email using secret password also. at 10:38 to 10:39 even he can't login. there is a cut in the video from 10:38 to 10:39 where somehow he got loggedIn,the funny thing is at 10:38 the token he copied frow jwt is different from 10:39 (where there is a cutshot in the video) and he got login.
Assalamo Alikum Sir Sir kiya asa office hai jo urdu mai interview ly our office waly urdu bholy muje typescript react javascript and node.js and exprees ati sirf language ka issues hai english ki samj ati par mai bol nhi sakti
Sir I really like your videos but there are 2 problems which I am facing: 1. Your authentication videos are dependent on URLGeneration videos. 2. If someone face any error in the URL at any point he wont be able to continue until that error gets resolved. 3. Solution : if you could provide the source code then it would be easier for us to resolve our errors. 4. Solution : If you could make such videos which are not dependent on each other then it would be easier for us to understand each concept from the Scratch
sir i am getting error "jwt malformed" i tried matching codes, also searched on stackoverflow but just couldnt solve the error...please help if you know...i will update if i get the solutain
i got the same error just now, restart ur server then dont directly go to "/" route , firstly clear cookie from Browser then go to the login page , login as user , then everythng will work fine
I dont know why everytime its giving me error as jwt malformed but i am writing the same code as you have written .. I have seen your all videos upto authentication and everything is fine but i dont know why as soon as i am using jwt its not working . i am working on it to find error from past 2 hours but its not working please help
function getUser(token){ if(!token) return null; try { return jwt.verify(token ,secret); } catch (error) { return null; } } use this function instead of what you've written
let say you want to make this project open source, but in the backend itself you shared the secret key and using that anyone can get make fake token????
Separate video better hai warna bohot long ho jata woh video na itna tum ya koi bhi samaj kr digest kr pata atleast iska part 1 video khtm hua hoga tb logo ne practice krne ka try kra hoga Netflix pr binge watch krne nahi aaye ho sikhne aaye ho tum yaha pr 🙂