Skip to content

Instantly share code, notes, and snippets.

@Arjun-sna
Last active Mar 10, 2019
Embed
What would you like to do?
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,
}),
});
@Arjun-sna
Copy link
Author

Js API call

@Arjun-sna
Copy link
Author

Testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment