Fetching a single user successfully

Using the token received after sign-in, we can now access the protected route that failed before. The token is set in the Authorization header in the Bearer scheme when making the GET request to /api/users/5a1c7ead1a692aa19c3e7b33, and this time the user object is returned successfully:

Get Full-Stack React Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.