No video

React js project # Login with API

  Рет қаралды 264,525

Code Step By Step

Code Step By Step

Күн бұрын

in this react js project we learn how to make the Logout feature in the react js project from scratch. This video is made by anil Sidhu in the English language
Login API integration
Test API for Postman
Make Form for Login
Store Data in State
Call API on Submit
Add LocalStorage and Redirect
Test Complete API

Пікірлер: 80
@ImranKhan-hl7qp
@ImranKhan-hl7qp Жыл бұрын
On refreshing the page, it is redirecting to the login page. Solutions::: result = await result.json() if(result.error) { alert(result.error) } else { localStorage.setItem('user-info',JSON.stringify(result)) navigate("/add") }
@wilsonibekason
@wilsonibekason 2 жыл бұрын
This is why simplicity matters
@HasanHayder
@HasanHayder 6 ай бұрын
great video thank you
@rabinsubedi5602
@rabinsubedi5602 3 жыл бұрын
Can you make a video on multiple user like admin and user login system with one login form
@CandySphynx
@CandySphynx Жыл бұрын
Thank you very much for this video!
@kavithamadhu4983
@kavithamadhu4983 6 ай бұрын
easy to understand..thankyou
@sengseangleng
@sengseangleng Жыл бұрын
That is a good one.
@soniclickadbox8646
@soniclickadbox8646 3 жыл бұрын
very nice tutorial well explained , Sir please give a tutorial on when we hit a url direct it does not work while we go with menu it works.
@bhakti.sangeet.officials
@bhakti.sangeet.officials 2 жыл бұрын
Line 13:6: React Hook useEffect has a missing dependency: 'history'. Either include it or remove the dependency array react-hooks/exhaustive-deps webpack compiled with 1 warning solution this error ??????
@enessenturk8237
@enessenturk8237 2 жыл бұрын
Did you find the solution? I am getting the same error.
@xalerion6996
@xalerion6996 2 жыл бұрын
@@enessenturk8237 useHistory is outdated, look for useNavigate at router documentation
@enessenturk8237
@enessenturk8237 2 жыл бұрын
@@xalerion6996 thank you so much.
@pushpendraupraity3755
@pushpendraupraity3755 3 жыл бұрын
if we are refreshing the page, it is redirecting to the login page again, how to stay on the main dashboard until we press the logout button ?
@DullJoker
@DullJoker 3 жыл бұрын
Good tutorial, honestly had some trouble understanding your speech due to your accent but after a couple of minutes it was alright alright alright :D
@yashbharadva4636
@yashbharadva4636 2 жыл бұрын
When i put condition on {login} then it shows this :- JSX props should not use functions. So i use function method so what should do and what are the solution for this..!!!
@peterkovacs9086
@peterkovacs9086 2 жыл бұрын
Hey! There is no validation in the frontend! If I hit the LOGIN with empty fields, or with unregistered details, I still can access Add product page etc...You need to check Laravel backend Api response in frontend javascript code!!!!!!!!!!
@DataVisualizationswithVizARTGr
@DataVisualizationswithVizARTGr Жыл бұрын
cool
@satishksharma
@satishksharma 2 жыл бұрын
How to prevent CSS & CSRF attacks with react and laravel
@mohankrishna9113
@mohankrishna9113 2 жыл бұрын
In html file do i need to specify anything apart from script tag by following URL of js file
@masumalimaknojiya9623
@masumalimaknojiya9623 3 жыл бұрын
How to Display User detail and wrong detail Error show.. help me
@KP-Kumar
@KP-Kumar 3 ай бұрын
Thanks❤
@GMGranMartu
@GMGranMartu Жыл бұрын
i will forever love you
@cpimenteldev
@cpimenteldev 3 жыл бұрын
Hi bro, you can put repo? thanks!
@tapanbhanot
@tapanbhanot 3 жыл бұрын
Where is the api code and db ???
@suhasgardare4833
@suhasgardare4833 7 ай бұрын
Inside description you can see whole playlist... 👍
@DullJoker
@DullJoker 3 жыл бұрын
for me, the login works like a hit or miss. sometimes it works and sometimes it just refreshes the page. Has anyone got a clue what's going on?
@ALBDev
@ALBDev 3 жыл бұрын
maybe you should prevent the default
@idreesibrahim5642
@idreesibrahim5642 3 жыл бұрын
believe me its very simple way to login.
@kosalsv8832
@kosalsv8832 2 жыл бұрын
Im used this method it shows CORS policy: No Access Control Allow Origin error. How to solve that ...pls help??
@shreyash9357
@shreyash9357 Жыл бұрын
How to restrict back button after login i need to restrict after login cannot be reverse from dashboard to login
@engr.raudahmed4730
@engr.raudahmed4730 3 жыл бұрын
need display password or email does not match message or which return api
@sahildudani4658
@sahildudani4658 2 жыл бұрын
Goterror while using await how to solve it Unexpected reserved word 'await'.
@manikandana.m3068
@manikandana.m3068 2 жыл бұрын
Is it correct to hit the login request from client side so that password can be seen in api request. Is there some other way for not to expose an login request from client side
@shashank_rajak
@shashank_rajak 3 жыл бұрын
All the devs teaching people to use local storage for authentication are doing a serious crime actually. It’s not at all a good practice to do authentication with local storage as the ultimate source of truth, especially user info.
@shashank_rajak
@shashank_rajak 3 жыл бұрын
Even on Udemy, folks are teaching to use local storage to check a user authenticity. But, anyone can put a token in local storage and when the page reloads it will find a token and get user logged in. I don’t know why everyone just tells the same way of authentication.
@gilalingayao3452
@gilalingayao3452 3 жыл бұрын
@@shashank_rajak do you have a better idea not to store token on local storage, if you have can you share?
@Behzad_Khoshdouz
@Behzad_Khoshdouz Жыл бұрын
The main reason for not using local storage as for keeping the token is its security, as you may know all the js on the page has access to the local storage, and if one of them is just vulnerable to for example XSS, they can access the local storage, and send it to the attacker. best practices suggest to use cookies for keeping tokens (jwt etc), and the cookie must be set with HttpOnly flag, these kind of cookies are not accessible by the JS on the page, the browser blocks js to access them, and they will be sent to the backend on every http request.
@ganeshkummara6057
@ganeshkummara6057 2 жыл бұрын
Hai bro I'm Ganesh How to take Dummy API for Login page AUthentication Purpose
@gaminggeekindia
@gaminggeekindia 8 ай бұрын
why didnt u show what's in Header file brother ;(
@a-23-roushansingh14
@a-23-roushansingh14 2 жыл бұрын
were is the github repository for the same??
@shubashdutta1986
@shubashdutta1986 Жыл бұрын
How to catch the error in this login If the user provide wrong password than
@kameshrajk9262
@kameshrajk9262 3 жыл бұрын
hi broo I got one error which that Without input also it going to dashboard
@youtubechehra
@youtubechehra 3 жыл бұрын
Code pura sir chahiye
@yraghavendra8000
@yraghavendra8000 2 жыл бұрын
what is that "/add" ? is it is component name ?
@Professor077
@Professor077 2 жыл бұрын
I added wrong information it still login
@anshulsoni653
@anshulsoni653 2 жыл бұрын
how you have routed the files ?
@DesiMatrixXD
@DesiMatrixXD 3 жыл бұрын
Don't store users info in local storage.
@youtubespecial6517
@youtubespecial6517 2 жыл бұрын
Let me jump on code....and code is already have useEffect hook . why u take that not explain at all in the video u should have to explaine it
@aprfocus7501
@aprfocus7501 3 жыл бұрын
Hi can share the source code of Reactjs
@anitagrawal2952
@anitagrawal2952 3 жыл бұрын
What is in the header.js file
@thehas4794
@thehas4794 2 жыл бұрын
useHistory??
@krishnavarma20
@krishnavarma20 2 жыл бұрын
can you send me git repository to download
@radheshyamgupta8656
@radheshyamgupta8656 2 жыл бұрын
Hey ,how to hide key and password
@AKvLogs-gb3cu
@AKvLogs-gb3cu 3 жыл бұрын
Bro react native main bhi signup and login pr video bnayn
@instant-code
@instant-code 3 жыл бұрын
right
@creatorboy4901
@creatorboy4901 2 жыл бұрын
sir api kaise create kare
@miketayo
@miketayo 3 жыл бұрын
the log-in works even when wrong data are passed. it should only allow authenticated users to login
@DesiMatrixXD
@DesiMatrixXD 3 жыл бұрын
You need to authenticate it in backend. If you want, there are plenty of tutorials available
@jakjun4077
@jakjun4077 3 жыл бұрын
@@DesiMatrixXD but how to make the server remember every authenticated user?
@DesiMatrixXD
@DesiMatrixXD 3 жыл бұрын
@@jakjun4077 database
@jakjun4077
@jakjun4077 3 жыл бұрын
​@@DesiMatrixXD i am still having doubt that if the user is authenticate successfully, the particular information will be return from database and store inside a local Storage or cookies, but some said these method might introduce Cross-Site attack or forgery, do u have any idea? let say i am implementing the system using flask as api, and react as the frontend and request information one.
@jakjun4077
@jakjun4077 3 жыл бұрын
btw, i am still new to this area, so basically what u means is storing the token in database and making it expires after a certain period? ps: because there are too many ways to do it.
@gopalbhardwaj3722
@gopalbhardwaj3722 3 жыл бұрын
Hi Sir, can u pls provide the link url for this entire project series.. not able to find out
@msn.muddam
@msn.muddam 3 жыл бұрын
Hi Gopal, did you figure out from where the project was?
@Armankhan-jy4eb
@Armankhan-jy4eb 3 жыл бұрын
forgot password ka video ayega kya is project mein ??
@user-mr6hu6qm9i
@user-mr6hu6qm9i Жыл бұрын
can you provide the source code
@retroRoadtrip11
@retroRoadtrip11 Жыл бұрын
Can you provide me login back end code
@retroRoadtrip11
@retroRoadtrip11 Жыл бұрын
I want only login controller and service
@narinetovmasyan9756
@narinetovmasyan9756 Жыл бұрын
can u send code?
@pushpendrasingh-jz3yq
@pushpendrasingh-jz3yq 2 жыл бұрын
sir ye code kha milega 😥
@slmshady539
@slmshady539 3 жыл бұрын
Sir ye Sara chiz Ka shuruaat Kaha se hai... Is wale project Ka ... Please sir bata do
@slmshady539
@slmshady539 3 жыл бұрын
Matlab is video me login samjhaya hai Apne toh shuru Kaha se Kia hai isko... Sign-up aur ye sab Kaha se hai shuru
@preethisanthosh4080
@preethisanthosh4080 Жыл бұрын
Where is app.js....not showing app.js ....mental
@AhmedHossamElDocInshaAllah
@AhmedHossamElDocInshaAllah 2 жыл бұрын
no God except allah
@RR-le7wd
@RR-le7wd 3 жыл бұрын
bro i need code for this video
@pizzapanni
@pizzapanni 3 жыл бұрын
type it yourself
@premprakash6673
@premprakash6673 3 жыл бұрын
bhai apna english improve kar, it's too much irritating while u make simple grammatical mistakes in the sentences.
React js project # Sign up API integration
17:08
Code Step By Step
Рет қаралды 88 М.
React User Login and Authentication with Axios
31:37
Dave Gray
Рет қаралды 558 М.
Oh No! My Doll Fell In The Dirt🤧💩
00:17
ToolTastic
Рет қаралды 13 МЛН
React js Tutorial - How To Get Data From An API With React
12:46
Fullstack Development
Рет қаралды 431 М.
Laravel with React Project # Add Product API with Image
12:54
Code Step By Step
Рет қаралды 17 М.
Every React Concept Explained in 12 Minutes
11:53
Code Bootcamp
Рет қаралды 607 М.
React protected routes in 4 minutes
4:03
Appwrite
Рет қаралды 12 М.
Best frontend and backend projects for resume
13:11
Hitesh Choudhary
Рет қаралды 208 М.
Postman Api Testing Tutorial for beginners
16:45
Codemify
Рет қаралды 31 М.