I can't figure out how to add oAuth to my react app

I’m a contractor at a company that has a few monday.com react apps that I need to fix in order for their tools to work again. Unfortunatly, the developer who originally built their custom forms no longer works at the company and didn’t leave us with any way to access the react apps in a proper way. That being said, I have successfull unpacked all the map files and was able to re-create the package.json file which got me past the build errors. I’m now struggling to know how to add oAuth to the app so that I can connect to boards while developing locally.

Can anyone help me understand where oAuth should be added in the react app project?

I was able to figure out my own issue. I needed to set my token in the mondaySdk. Is this the correct way to go about this though?

We have a useMonday.ts file, in this file there is a function that looks like this:

export default function useMonday() {
  const mondayClient = mondaySdk();

  return mondayClient;
}

To get my app to connect with actual data from monday, I set the API version and the API token:

export default function useMonday() {
  const mondayClient = mondaySdk();
  mondayClient.setApiVersion("2024-10");
  mondayClient.setToken("<insert_your_api_token_here>");
  return mondayClient;
}