React js project # Login with API

preview_player
Показать описание
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
Рекомендации по теме
Комментарии
Автор

Can you make a video on multiple user like admin and user login system with one login form

rabinsubedi
Автор

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")
}

ImranKhan-hlqp
Автор

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.

soniclickadbox
Автор

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

bhakti.sangeet.officials
Автор

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

DullJoker
Автор

In html file do i need to specify anything apart from script tag by following URL of js file

mohankrishna
Автор

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 ?

pushpendraupraity
Автор

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

manikandana.m
Автор

When i put condition on <button> {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..!!!

yashbharadva
Автор

believe me its very simple way to login.

idreesibrahim
Автор

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

peterkovacs
Автор

How to prevent CSS & CSRF attacks with react and laravel

satishksharma
Автор

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
Автор

Im used this method it shows CORS policy: No Access Control Allow Origin error. How to solve that ...pls help??

kosalsv
Автор

How to Display User detail
and wrong detail Error show..
help me

masumalimaknojiya
Автор

Goterror while using await how to solve it Unexpected reserved word 'await'.

sahildudani
Автор

Hai bro I'm Ganesh How to take Dummy API for Login page AUthentication Purpose

ganeshkummara
Автор

were is the github repository for the same??

a--roushansingh
Автор

How to restrict back button after login i need to restrict after login cannot be reverse from dashboard to login

shreyash
Автор

the log-in works even when wrong data are passed. it should only allow authenticated users to login

miketayo
join shbcf.ru