Add Medium Node (#788)

* add medium node

* minor fixes

* fix publication post

* fix according to feedback

* additional fixes

* fix license description

*  Small improvements

*  Improvements

Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
This commit is contained in:
Shraddha Shaligram
2020-08-05 00:29:29 -07:00
committed by GitHub
parent 94862d2db4
commit a5b6b3d209
7 changed files with 703 additions and 0 deletions

View File

@@ -1162,6 +1162,13 @@ class App {
const authQueryParameters = _.get(oauthCredentials, 'authQueryParameters', '') as string;
let returnUri = oAuthObj.code.getUri();
// if scope uses comma, change it as the library always return then with spaces
if ((_.get(oauthCredentials, 'scope') as string).includes(',')) {
const data = querystring.parse(returnUri.split('?')[1] as string);
data.scope = _.get(oauthCredentials, 'scope') as string;
returnUri = `${_.get(oauthCredentials, 'authUrl', '')}?${querystring.stringify(data)}`;
}
if (authQueryParameters) {
returnUri += '&' + authQueryParameters;
}