Тёмный

React Authentication with Cookie 

Daily Web Coding
Подписаться 21 тыс.
Просмотров 92 тыс.
50% 1

www.npmjs.com/...
reacttraining....
In this video i am going to show you how to make react authentication with cookie

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

 

9 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 81   
@DailyWebCoding
@DailyWebCoding 3 года назад
if you are worry about security check this out. React(JSX) default is preventing from XSS attack. unless you inject it DOM directly or do something like this ; dev.to/spukas/preventing-xss-in-react-applications-5f5j
@DailyWebCoding
@DailyWebCoding 3 года назад
@Kameshraj Kumar Can you join discord server? you can ask me over there.
@DailyWebCoding
@DailyWebCoding 3 года назад
discord.gg/XbJkCtt This is our discord server
@pauljoshuacabanlit7523
@pauljoshuacabanlit7523 3 года назад
@@DailyWebCoding Can i join your discord server? I have something to ask please need help
@redrum3075
@redrum3075 2 года назад
You simply stated everything need to accomplish the goal and you very articualtely explained every espect of it . It shows you have complete command and knolwedge of the topic! Great job. HOWEVER there is a security flaw. THat Cookie can be changed by user to logintrue to get FULL app access !
@jorgedardon5487
@jorgedardon5487 4 года назад
This has security concerns. I would not use a site that had authentication implemented this way. Please create part 2 of the video so people do not overlook this. For people wanting an easier and more secure method for user authorization, use firebase authentication. Both client and admin sdk.
@talkohavy
@talkohavy 2 года назад
I agreed with you, until you marketed firebase. A good (an even great) security can be achieved coding manually, without using something like firebase.
@beefbox
@beefbox 2 года назад
What's wrong here, this is just for the client side experience. Auth is done on the backend.
@faisalshahzad9514
@faisalshahzad9514 3 года назад
Thank you so much. I was looking for the same thing, It covers not only cookies also Routing and context hooks . Love you & keep it up
@estebancanteros1175
@estebancanteros1175 3 года назад
Thank you so much, I had a lot of troubles with maintaining session with React, your video really helped me
@semihcanbilgen3477
@semihcanbilgen3477 2 года назад
[protectedRoute] is not a component. All component children of must be a or so waste time at least routing part.
@andrelima6916
@andrelima6916 2 года назад
I have this same error here...
@andrelima6916
@andrelima6916 2 года назад
how did u solve it, please bro?
@oscargalvez7
@oscargalvez7 Год назад
Thanks a lot for the video! Very well covered! The cookies was what I was looking for and you helped me find just what I needed 👌
@foxynight1688
@foxynight1688 Год назад
Thank you for this video!! This is exactly what I needed and your explanation is clear and easy to understand....!!!!! but the Auth.auth not working
@deveshrawool6035
@deveshrawool6035 3 года назад
Man this was a great explanation. Thanks a lot!
@GetRubyBlue
@GetRubyBlue 2 года назад
Super helpful tutorial HOWEVER this uses react--router-dom@5.2.0 and will not work with version 6.0 since the Switch has been changed to Router. I struggled to make it work and then decided to run npm uninstall react-router-dom followed by npm install reacte-router-dom@5.2.0 and then it worked great. This issue is noticeable at the 5:50minute mark.
@alejanddromendoza5080
@alejanddromendoza5080 2 года назад
I have 5.3.0, will it still work or it has to be strictly 5.2.0?
@salmansaeed4039
@salmansaeed4039 2 года назад
Correction: Switch has been changed to Routes *
@MrAps98
@MrAps98 3 года назад
Wow it's quite simple. Thank you!
@codewithdrealola
@codewithdrealola 3 года назад
Thanks for the video, but in this I'm the auth state wont be global (meaning being able to use the state in other component without passing down props)?
@yanaytsabary8297
@yanaytsabary8297 4 года назад
Exactly what I needed!! Thank you !!
@mitulmarfatia3623
@mitulmarfatia3623 3 года назад
Its great bro. I was Show many videos about protected route but your video is to great.
@andrelima6916
@andrelima6916 2 года назад
[protectedRoute] is not a component. All component children of must be a or How could we solve this error, please?
@DailyWebCoding
@DailyWebCoding 2 года назад
Which version of react-router-dom are you using???
@andrelima6916
@andrelima6916 2 года назад
@@DailyWebCoding v6.3.0
@andrelima6916
@andrelima6916 2 года назад
@@DailyWebCoding I sent you a direct msg on discord...
@Priyanka-er9wd
@Priyanka-er9wd 2 года назад
@@andrelima6916 yes it is not working.. What should I do??
@tienlx97
@tienlx97 3 года назад
You got bug ? After login, if you refresh dashboard, it will change url from "/dashboard" to "/login" then redirect to "/dashboard". It happend very quick
@anabuch5986
@anabuch5986 3 года назад
Thanks. You explaim very good. "Simple" and good. I have another question. What does the "star" in this export means? export function* handleGetIdentityRequest()
@me_tanmay
@me_tanmay Год назад
need some changes acc router-dom v6, many things such as switch and Route way to handling components nd attributes are changed, otherwise a great summarization for secure authentication!
@DailyWebCoding
@DailyWebCoding Год назад
Thank you so much for your feedback. I will try to update it
@jakubolejnik9341
@jakubolejnik9341 4 года назад
anyone has a solution on what is mentioned in the end of the film?
@alejandramarinascencio2984
@alejandramarinascencio2984 4 года назад
In which part do you have problems?
@brikozub
@brikozub 4 года назад
@@alejandramarinascencio2984 He's talking about how the cookie can have any value and still be considered authenticated, I believe.
@marcolancellotti8114
@marcolancellotti8114 3 года назад
​ @Jakub Olejnik once the presence of the token redirects you inside the app, you should still have a loader hiding the page and in the background an API call should immediately be done to verify the token and its respective user. if it is not valid , then clear the token and redirect to the login page
@anhhoangtuan6214
@anhhoangtuan6214 4 года назад
thanks, guy. this video is very useful and my problem was resolved,
@lukepiette8575
@lukepiette8575 4 года назад
Loing
@yotsusan_machi
@yotsusan_machi Год назад
how to set the cookie expirase date only 1 hour???
@MrChealsea007
@MrChealsea007 3 года назад
I couldnot find the second part. So, how to secure the cookie? :(
@RizatDartMedia
@RizatDartMedia Год назад
you the best master, thank you so mutch .
@manuelpineda924
@manuelpineda924 3 года назад
Thank you! love the video!
@PauCode
@PauCode 4 года назад
Thank you! i love this video
@ghassenkefi4724
@ghassenkefi4724 4 года назад
So i added another ProtectedRoute for let's say about page. when i write in the url /About it redirect me to dashboard if i'm login not about can u help me
@DailyWebCoding
@DailyWebCoding 4 года назад
I think you should make the navigation to the about page rather than go to that page directly by typing in the URL. The reason when we typed in the URL and redirect to the dashboard because when you do that the page is refreshing and it will check that you are authentication or not if yes it's always redirecting to the page that we serve which is Dashboard page. Try: above add About Hope that's working :)
@ghassenkefi4724
@ghassenkefi4724 4 года назад
@@DailyWebCoding yeah i already tried it with nav it works but i wanted to know why it doesn't work with the url so thank you for the explanation 🙏
@luismeza6015
@luismeza6015 3 года назад
You clould try to add "exact" like this :
@farhan_mfh
@farhan_mfh 4 года назад
can you please make a video explaining session with Express-Session
@KarolCud
@KarolCud 4 года назад
Try to coding little bit slower then you will avoid many typos errors... :-)
@sayanadhikary1682
@sayanadhikary1682 2 года назад
Thanks, this really helped me.
@c_r8256
@c_r8256 3 года назад
What is your theme for your navigator ?
@AlDAan17
@AlDAan17 4 года назад
dude, what the theme are you using?
@darlingchavez8796
@darlingchavez8796 3 года назад
× TypeError: Cannot read property 'location' of undefined
@EduardoFlores-mx6eh
@EduardoFlores-mx6eh 3 года назад
can you resolve this?
@assad_bin_wadeen
@assad_bin_wadeen 2 года назад
Thank you bro
@shalakakapure3683
@shalakakapure3683 Год назад
Where is the next part??
@alirezatafhim8755
@alirezatafhim8755 4 года назад
Thanks for that, but here is the question: can someone kinda change the isAuthenticated state, and visit protected routes? :(
@KarolCud
@KarolCud 4 года назад
Yes, so you should care about authentication on backend side too. Then even is someone hack your front app he will not get the content.
@zzang535
@zzang535 3 года назад
Thank you for useful video :)
@kiransiddeshwar
@kiransiddeshwar 3 года назад
where is second video, can you share me plz
@hiyaborah6192
@hiyaborah6192 4 года назад
Thank you for the video
@FahadAli-ot5kn
@FahadAli-ot5kn 4 года назад
Tell me about security can any cokkie stealing here....while debug
@ahmetaslan8711
@ahmetaslan8711 3 года назад
Video full of vulnerabilities. Anyone can instantly access the system, don't teach people that way.
@DailyWebCoding
@DailyWebCoding 3 года назад
Thank up for this. I have changed the name of the video and sorry for inconvenience.
@DailyWebCoding
@DailyWebCoding 3 года назад
if you are worry about security check this out. React(JSX) default is preventing from XSS attack. unless you inject it DOM directly or do something like this ; dev.to/spukas/preventing-xss-in-react-applications-5f5j
@ABUTAHER-wg7gz
@ABUTAHER-wg7gz 2 года назад
server sent cookie, can i get access directly i mean without set cookie
@cben1998
@cben1998 2 года назад
You should still be able to use the same method to get the cookie. You can check if the cookie has indeed been sent by the server via your browser settings.
@wicia2968
@wicia2968 2 года назад
Everything cool, but man just stop trying to type so fast and then fast repairing the mistakes, because it is so annoying when u type something wrong and u repair 1 word 3 times :D
@phamvanhan7037
@phamvanhan7037 4 года назад
Have you released the next video?
@DailyWebCoding
@DailyWebCoding 4 года назад
I am planning to build forum web application with mern stack.
@jakubolejnik9341
@jakubolejnik9341 4 года назад
did you found out how to do this?
@shafiemukhre
@shafiemukhre 4 года назад
Thank you!
@DailyWebCoding
@DailyWebCoding 4 года назад
You're welcome!
@tumon001
@tumon001 2 года назад
Thanks
@prabhatkashyap8333
@prabhatkashyap8333 4 года назад
can you share the code.
@arjunholmie
@arjunholmie 4 года назад
Volume, ever heard of it?
@Terry565
@Terry565 2 года назад
src code?
@GakisStylianos
@GakisStylianos 4 года назад
Would have been so much easier if you had the source code as well available. Jumping through the video is quite time consuming.
@youssefel-shabasy833
@youssefel-shabasy833 4 года назад
nice
@yukiewho8244
@yukiewho8244 4 года назад
Sounds familiar
@kokokaka8656
@kokokaka8656 2 года назад
b som source code 1 mao
Далее
What are Cookies in NodeJS?
30:35
Просмотров 60 тыс.
Introducing iPhone 16 | Apple
02:00
Просмотров 4,1 млн
Protected Routes in ReactJS - React Router Dom
19:03
Просмотров 67 тыс.
61 - React JS - cookie, login в теории, auth/me
38:52
Difference between cookies, session and tokens
11:53
Просмотров 626 тыс.
Micro-Frontends in Just 10 Minutes
11:00
Просмотров 228 тыс.