Last updated February 21, 2020

In order to get our fully decoupled React application working, we need to update the existing fetch HTTP requests to use OAuth tokens. This includes adding the Authorization header to requests, and handling refresh tokens as well.

In this tutorial we'll:

  • Provide a way to exchange a username and password for an access token
  • Update existing fetch code to use the acquired access token
  • Handle expired access tokens via a refresh token

By the end of this tutorial you'll be able to use OAuth access tokens to make authenticated requests in a React application using fetch.