Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
stackexchange OAuth switch
const _u = URL.parse(provider.url);
const hostSite =[.]com/g, '').replace(/[.]stackexchange/g, '');
const params = {
url: '',
responseType: 'json',
oauth: oauth,
query: {
order: 'desc',
filter: 'withbody',
site: (hostSite === '') ? 'stackoverflow' : hostSite,
access_token: oauth.access_token,
key: provider.apiKey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.