This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Config from 'react-native-config'; | |
import axios from 'axios'; | |
const response = await axios(GITHUB_OAUTH_ENDPOINT, { | |
method: METHOD.POST, | |
headers: { | |
Accept: 'application/json', | |
'Content-Type': 'application/json', | |
}, | |
data: JSON.stringify({ | |
client_id: Config.CLIENT_ID, // Access CLIENT_ID env varaible using `Config` | |
client_secret: Config.CLIENT_SECRET, // Access CLIENT_SECRET env varaible using `Config` | |
code, | |
state, | |
}), | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Js API call