Using JWT Authentication in React

preview_player
Показать описание
For the code from the first video, look here

In this video, we will use our JWT api and log in and see a protected route. This was a shorter video as I hadn't made something in awhile and it was about time that I did.

Let me know of any comments/questions/concerns and I'll be happy to help out.
Рекомендации по теме
Комментарии
Автор

New to backend dev. Was having issues finding any answers. Looked at your code and how you were posting your request and everything just worked. THANK YOU!

vincentn
Автор

I’m new to React and this has been one of the best videos I have seen on this topic. Thanks!

ericcrawford
Автор

Went on a couple of videos before this one, everyone else greeting with "Hello and welcome" quite professionally, this guy's intro " what-up ma dudes"

owenoj
Автор

If you see [Object object] for the tokens value in local-storage try changing res.data to res.data.token
}).then(res => localStorage.setItem('cool-jwt', res.data.token))

Maxorduck
Автор

Best video walkthrough I've seen. I wish you were still making videos. Thanks

camsolo
Автор

Will this work if I go directly to /Protected and put somethin random in console with localStorage.setItem('cool-jwt', 'Bearer Random')?

rgwritescode
Автор

You saved my life with this video, now i can modify and work with it better

alfredbryan
Автор

How does this work with an ErrorPage component?
For my example I have an errorPage component and a Menu that I only want to shower if they're Authed.
<Switch>
<Route path="/" component={Home}/>
<Layout>
<AuthenticatedComponent>
<Route path="orders" component={Orders}/>
</AuthenticatedComponent>
</Layout>
<Route component={ErrorPage}/>
</Switch>


it never seems to go to the ErrorPage component

galeontiger
Автор

I love you <3 this video solved my issue that i've been dealing with for 3 days

woket
Автор

i love the amount of silly mistakes you make lol, makes me feel not so bad, but you are much quicker to find and fix them than me.

liamsmith-ypxh
Автор

Great video. Love seeing vim being used in other environments.

andrewdudley
Автор

Great video Taylor. Next time please zoom in or make the font larger. The code is really tiny watching online.

craigjohnson
Автор

This is exactly what i needed!!! Thank youu

jem
Автор

How to solve this type of warning?


This occurred when I was set bootstrap template in react.


index.js:2178 Warning: validateDOMNesting(...): <li> cannot appear as a descendant of <li>.
in li (at authenticated.js:200)
in li (at authenticated.js:199)
in ul (at authenticated.js:185)

rahulkhokhariya
Автор

Thanks a lot for this! Hope you continue to do more videos like this

powerToYourself
Автор

That's one awesome video which helped me sort things out a bit. Thanks!

rizwer
Автор

appreciate your super cool demonstration!!

johnsuhr
Автор

Hi I have a question bro. "npm install --save react-router-dom axios"
what is react-router-dom? is it destination path?

ปรเมศคงดารา
Автор

Hello guys maybe you can tell me why i am getting problem with

dinashantina
Автор

How to generate JWT token please me out.. thanks in advance

NandhuKishorReddy