Тёмный

🔴How to Logout User & Delete Cookie (JWT Token) in Nodejs & MongoDB App in Hindi in 2020 

Thapa Technical
Подписаться 691 тыс.
Просмотров 49 тыс.
50% 1

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 86   
@priyamshankar468
@priyamshankar468 2 года назад
dude that 3.30 prompt was really helpful, huge respect to you, keep up the good work
@pranjalverma8239
@pranjalverma8239 8 месяцев назад
jo sign lagaya hai filter function m use kese lagate hai ??
@yashrajjaiswal9941
@yashrajjaiswal9941 3 года назад
I didn't understand aapne auth() me req.token=token; and req.user=user; Q likha?? Plz explain
@vedantbhoyarxd
@vedantbhoyarxd 3 года назад
to use them across various urls
@usamajaved-zc8ls
@usamajaved-zc8ls Год назад
His method is so good 🙂
@amir4ever148
@amir4ever148 2 года назад
21:40 bhai jwt yaha se to delete hui nahi
@achintyamondal18
@achintyamondal18 3 года назад
Please tell me how to show error in hbs page?
@shivam5273
@shivam5273 3 года назад
Bhai please gsoc ma video upload karo Ki koi bhi codebase kasa samjha
@omkarjadhav7032
@omkarjadhav7032 3 года назад
Sir , How To Secure Our Site Through Node Express ?
@nandikdevbhuti6070
@nandikdevbhuti6070 4 месяца назад
Why are we deleting the jwt token from the database. It was created when the user registered that device right? Then on logout ideally shouldn't the user be able to directly login to the application, instead of again registering himself? Also why are we storing the token in the database, when we are just comparing the login's jwt token with the SECRET_KEY?
@ayu_slayss
@ayu_slayss 3 месяца назад
Since its been 3 weeks, did you get the answer of the last ques of comparison you asked??
@nandikdevbhuti6070
@nandikdevbhuti6070 3 месяца назад
@ayu_slayss No, I didn't receive any answer. But what I find out myself is that ideally there is no need for storing a jwt token during registration. Jwt token should be temporary and should be generated at the time of login. Then, while accessing different routes, there should be an authVerify middleware that would ensure the validity of the token before every page visit/api hit.
@anandparmar5068
@anandparmar5068 3 года назад
in angular, html file save karane pe auto compile nhi ho rahi hai but other file auto compile ho rahi hai.
@pupjetofficial
@pupjetofficial 3 года назад
i don't understand how does removing the tokens logout the user as ...we are authenticating using verfiy to authenticate the user and not verifying token in the cookie===token in database... and also verify just returns the id of the user which has nothing to do with database ....
@nitishverma7275
@nitishverma7275 3 года назад
Bro u know how to hide login and register from navbar after login ?? Plzz help
@pupjetofficial
@pupjetofficial 3 года назад
​@@nitishverma7275 i am no pro... but one way is using handlebars where you can use if else ...read more here about using if else and other logic in hbs files (handlebarsjs.com/guide/builtin-helpers.html#unless) Then you can do like {{#if somevar)}} html code for signin and signup so when you want to show login just send {somevar : true} from your app.js and when you render a secret page then send {somevar:false } then that part wont render and you won't see the button if you don't understand learn how to use template engine (any) to send variable (if you already don't know😂)
@roshanlashkari6082
@roshanlashkari6082 3 года назад
Dear in case of single user logout , the token is generated based on userid so same token is generated every time login, so when try to delete that tokon from db then all token are deleted so please may you suggest me how to generate different token for same user id while every login????
@thinkingmad1685
@thinkingmad1685 3 года назад
It always generate different token during login not the same one so it will delete the recently generated token not the previous token.
@Sunil_gora
@Sunil_gora 3 года назад
@@thinkingmad1685 bro delete hone k bad agr waps login kr rha hun toh tokens db me save he nhi ho rhi h
@colabbro7789
@colabbro7789 Год назад
@@thinkingmad1685 nahi bro. wo register and login ke time par same hi token genrate kar raha he.
@dennyage4791
@dennyage4791 3 года назад
One doubt... triple not equal to kaise type Kiya keyboard se ???
@srijansinha6921
@srijansinha6921 2 года назад
Using extension maybe but you can simply use !== Its same thing
@shivangigupta119
@shivangigupta119 3 года назад
clearCookie function is not working in my code . What sholud I do?
@NIKHIL27B
@NIKHIL27B 3 года назад
me too
@OrekiUchiha_amv
@OrekiUchiha_amv 2 года назад
It wasn't working in mine too.. later I found that I had been using clear cookie on req instead of res
@GurjeetSingh-iu5jo
@GurjeetSingh-iu5jo 3 года назад
My login token is not saving in db
@arungujjar7328
@arungujjar7328 3 года назад
Use await this.save(), When u created a function for generating tokens.
@usmanmughal5916
@usmanmughal5916 3 года назад
How can we use req.user globally in a get function without passing "AUTH"middleware E.g app.get(''/check',(req.res)=>{ if (req.user){ res.send('REQ.USER IS IN REACH') }else{ res.send('PLEASE LOGIN TO VIEW THE MESSSAGE') } Please iska hall bata dein
@akashrana9903
@akashrana9903 3 года назад
You can use node local-storage .
@usmanmughal5916
@usmanmughal5916 3 года назад
@@akashrana9903 First time hearing it :(
@harshkumar-mm6pq
@harshkumar-mm6pq 2 года назад
i m facing an error...this shows req.user.save is not a function
@deepikakapoor9607
@deepikakapoor9607 3 года назад
I am first 😀
@ThapaTechnical
@ThapaTechnical 3 года назад
Congratulations🥇
@AviatorBro
@AviatorBro 3 года назад
@@ThapaTechnical 😂😂
@laboflaughters3092
@laboflaughters3092 2 года назад
12:54 error
@riturajprajapati5660
@riturajprajapati5660 3 месяца назад
If someone copies the token after login and simply logout and after logout he is trying to access any page using that token in this case how we can handle it.
@CrimsonShadow304
@CrimsonShadow304 3 года назад
Aapki sari vedioes ko like karunga main
@zsar_official
@zsar_official 3 года назад
What if user doesn't logout and the cookie expires, then the cookie will be deleted from the browser but the tokens which are created will remain in the database. How shall we delete those tokens in this case ? Please explain.
@srijansinha6921
@srijansinha6921 2 года назад
Yes I have same problem bro. Can you tell me what you did?
@ishita6014
@ishita6014 3 года назад
Thank you so so so so much vinod sir. You've helped me a lot in making my project. Can you please make a video on how to make admin panel with its backend ? I'll be really thankful
@manishdhungana331
@manishdhungana331 3 года назад
can you please make a video on multi authentication system where there is admin and user login and logout would be a great help
@incoginationkhan1606
@incoginationkhan1606 Год назад
mine code is not able to logout it says Cannot read properties of undefined (reading 'token') could someone help
@z-index574
@z-index574 Год назад
Same error how to solve it
@CrimsonShadow304
@CrimsonShadow304 3 года назад
Aap ke paas to jarur 3lakh subscriber ayenge itni achi videos jo banate ho
@saptathirtachoudhury4158
@saptathirtachoudhury4158 11 месяцев назад
finally I made successfully logout
@pankajpriney7253
@pankajpriney7253 3 года назад
Why you not use sessions in nodejs express?? you are using web token and cookies
@Sunil_gora
@Sunil_gora 3 года назад
bro aapne local host se 3-4 devices se kaisse signup kiya??
@amir4ever148
@amir4ever148 2 года назад
when i logout my cookie is not getting clear even thought i used res.Cookie("jwt") method but if i refresh again than its showing jsonwebtoken required error anybody knows how to fix it ?
@AabidKhan-bv7qk
@AabidKhan-bv7qk 3 года назад
almost completed this awesome series.... plzz make complete project with reactjs
@priyamganguly
@priyamganguly Год назад
This was indeed an extremely important tutorial. However, I'd like to do one thing. By default, the Logout button won't be visible. When the user logs in, then the Logout button will be visible and the Login button will disappear. Again, when the user logs out, the Logout button will disappear and the Login button will be visible. How can I do it? Any help on this issue is highly appreciated. Please suggest.
@ishwarshelke128
@ishwarshelke128 2 года назад
iska github link plzz
@utkarshsinghchouhan8819
@utkarshsinghchouhan8819 Год назад
thanks sir😊😊
@mddanish7095
@mddanish7095 2 года назад
1.5 yr k baad bhi 1k like ka target complete nahi hua>> :)🤨🤔🤔
@laboflaughters3092
@laboflaughters3092 2 года назад
11:28
@britenswargiari7775
@britenswargiari7775 2 года назад
Sir ji res.ClearCookie("jwt") karne k bad req.user.save() kyu kia ??. A toh sirf browser par jo cookie stored tha usi ko hi clear karna tha na??? Db ka cookie ko toh clear nahi karna tha. Toh req.user.save () kyu kia?? Hamko a samajh nahi a raha. Par db and browser par jo cookie tha usay filter out karke return karne k bad jo req.user.save() kia wo samajh may aya.
@britenswargiari7775
@britenswargiari7775 2 года назад
Koye toh reply karde yrrr!!!!!!
@udaypratapsingh9731
@udaypratapsingh9731 3 года назад
Love u sir 🙏
@RajeshKumar-qz2hk
@RajeshKumar-qz2hk 2 года назад
kya app bat sakate h ki login krne ke bad logout ko kese hide krn hai plz
@ankitsharma4035
@ankitsharma4035 3 года назад
hello sir please make a very small project of nodemailer with react and teach us how to connect node js express js and mango with react in hindi please sir
@ankitsharma4035
@ankitsharma4035 3 года назад
if anyone knows please reply
@kunalagarwal4473
@kunalagarwal4473 2 года назад
at 19:05 how you did that not equal to plz tell sir !!
@mansoorabbas5386
@mansoorabbas5386 3 года назад
its not filtering the actual tokens array in the database atlas
@faizanawais9045
@faizanawais9045 2 года назад
please make a video on also session in node and express js.
@kanavraina5965
@kanavraina5965 3 года назад
awesome video. Sir please make a video on react style components
@dhainik.suthar
@dhainik.suthar 3 года назад
type error : req.user.save is not a function why this error ?
@zsar_official
@zsar_official 3 года назад
req.user.save()
@harshkumar-mm6pq
@harshkumar-mm6pq 2 года назад
@@zsar_official still facing same error
@the2minshow731
@the2minshow731 3 года назад
Thapa you were best you are best and you will 🥰🥰
@ezone2726
@ezone2726 3 года назад
Awesome tutorial🙏🏽🙏🏽 Please also teact us forgot pw, change pw..and the login username is in the the website.
@Sunil_gora
@Sunil_gora 3 года назад
after logout when i login again tokens are not saved in database plzz help me!!!!
@CrimsonShadow304
@CrimsonShadow304 3 года назад
Can we add sign up with Google and Facebook in nodejs like you did in php MySQL tutorial also can we add verification email and remember me in node js like PHP MySQL tutorial. If yes then will you make videos on them in this series. Please reply. One last question should I learn php or nodejs . I'm a 10 class student and I know basic javascript HTML5 CSS3.
@sauravrijal5855
@sauravrijal5855 3 года назад
learn NodeJS. It has great future ahead. PHP will come to an end after certain years.
@srijansinha6921
@srijansinha6921 2 года назад
@@sauravrijal5855 bro he is asking email verification in nodejs & mongodb not php. Vinod bhai already did email verification of php, he is asking the same for Nodejs and mongodb.
@Sunil_gora
@Sunil_gora 3 года назад
after logout when i login again tokens are not saved in database plzz help me!!!!
@srijansinha6921
@srijansinha6921 2 года назад
Same problem. U get solution? Help me!
@nikhilraj2688
@nikhilraj2688 8 месяцев назад
You deserve a like dude
@vrajpatel0218
@vrajpatel0218 Год назад
thank you so much sir !!!
@hiteshsuthar1097
@hiteshsuthar1097 3 года назад
Really useful ❤️🔥🎉
@nitishverma7275
@nitishverma7275 3 года назад
Bro u know how to hide login and register from navbar after login ?? Plzz help
@nicetomeetugaming7024
@nicetomeetugaming7024 2 года назад
Thanks a lot thapa sir!
@saketsingh2057
@saketsingh2057 3 года назад
I appreciate your work sir....... thanks for your mentorship...
@KevinNeel-kl6tq
@KevinNeel-kl6tq 3 года назад
Great videos learned a lot from it
@rexoanimations1714
@rexoanimations1714 3 года назад
First
@kalpeshmali1476
@kalpeshmali1476 3 года назад
Awesome as usual
@ratul1125
@ratul1125 3 года назад
3:30
@Sunil_gora
@Sunil_gora 3 года назад
after logout when i login again tokens are not saved in database plzz help me!!!!
Далее
Se las dejo ahí.
00:10
Просмотров 2,2 млн
С какого года вы со мной?
00:13
Просмотров 207 тыс.
КОТЯТА В ОПАСНОСТИ?#cat
00:36
Просмотров 1,1 млн
Authorization in NodeJS
19:33
Просмотров 41 тыс.
Register and login a user with JWT token
39:21
Просмотров 50 тыс.
How to Log Out From Node JS Server with JsonWebToken
15:31
NADIR ALI PODCAST FEATURING DR ZAKIR NAIK !!
1:41:28
Se las dejo ahí.
00:10
Просмотров 2,2 млн