ReactJS Ecommerce Part 5: Logout system in React JS with Bearer Token using Laravel 8 Sanctum API

preview_player
Показать описание
#reactjs_ecommerce #reactjs_laravel_ecommerce
In this video, I have taught how to make a Logout System in React JS using Laravel 8 Sanctum with Bearer Token.

ReactJS Ecommerce Part 1: How to build an admin panel in React JS

ReactJS Ecommerce Part 2: Install Laravel8 & Create Login, Register in ReactJS

ReactJS Ecommerce Part 3: Registration System in React JS using Laravel 8 Sanctum

ReactJS Ecommerce Part 4: Login System in React JS using Laravel 8 Sanctum

ReactJS Ecommerce Part 5: Logout system in React JS using Laravel 8 Sanctum API

Рекомендации по теме
Комментарии
Автор

You are the one of the great tutor in my Programming life. Your all videos are very easy to understand for me. Thanks for sharing your knowledge.

sinnathambysaseenthiran
Автор

Superb Video . It really helpful me and doing it in my laptop by watching your video very well and getting required output. Thank You Very Much..!

nitinmoon
Автор

you’re an amazing coder and tutor!!! but can you please make a video on how to create forgot password and reset password api aswell as confirm email api with laravel and react js?

osama
Автор

Thank you for this tutorial.. really made things easy for me

akinladesolomon
Автор

Thanks so much maan. So, how can I show loading on the buttons when calling for apis? for example the login buttons and register

oscarjohne
Автор

Message : unauthenticated
Is coming how to solve this ???

AbhishekPal-rigr
Автор

if anyone face the problem in react router 6 then can use: <Route path="/login" ? <Navigate to="/"/> : <Login/>} />

sumonkhan-qdnx
Автор

Hello, This was a great video! Sir, I am socked. laravel 8x is showing undefine method ...tokens()->delete(); How do I solve this pls?

mysuccessword
Автор

if you get an error "Cannot read property 'cancelToken' of undefined"
You can try this in app.js :

Change : config.headers.Authorization = token ? `Bearer ${token}` : '';
To : config.headers.Authorization = 'Bearer ' + token;

azhannu
Автор

$user = new User();
$user->tokens()->delete();
working in laravel 9.

mdabujafar
Автор

in the first thanks for your knowldge,

auresdz
Автор

Good tutorial but I got this error Undefined method 'tokens'.

brianmweu
Автор

[Login] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment> i got this error

zoyashakeel
Автор

I have a question, Please correct me if I am wrong. When you are registering you will get auth-token in local storage so based on your condition won't you see logout button even without login? thanks.

Idyllicenam
Автор

Hi, is it safe to store token in local storage? i think this is dangerous.

bilelbelghith
Автор

its giving me error 401 not authorized?

babarbhatti
Автор

Undefined method 'tokens'. :(((

TriNguyen-incx
Автор

its giving me error 401 not authorized?

_suryak