Auth0 Home Blog Docs

In React, how do you find a user's access token?

auth0

#1

Sorry for the very basic question guys, but I’ve been trying to do this for hours now and don’t know who to turn too!

I followed this tutorial for building an app with React: https://auth0.com/docs/quickstart/spa/react/01-login

Now, I need to get the accessToken for Auth0 so that I can send that to my Node API for authentication. How do I do that? What does the access token look like, and where is it?

Is there any decent tutorials that take you through the full-stack with Auth0? I’ve seen tutorials for both sides separately, but that’s not very helpful when the hardest part is getting them to work together.


#4

/01-Login/src/Auth/Auth.js

in handleAuthentication() function:
authResult.accessToken

you can log in your console and see what does it look like.


#6

:wave: @alex4 were you able to implement your project with React? were you still having trouble with the access token ?