Github client_id and client_secret
- Register a new OAuth application
- Create a file named .env.local in the root
REACT_APP_GITHUB_CLIENT_ID='YOUR_CLIENT_ID' REACT_APP_GITHUB_CLIENT_SECRET='YOUR_CLIENT_SECRET'
const client_id = process.env.REACT_APP_GITHUB_CLIENT_ID; const client_secret = process.env.REACT_APP_GITHUB_CLIENT_SECRET;
const res = await axios.get(
`https://api.github.com/users?client_id=${client_id}$client_secret=${client_secret}`
);
App.js