mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
🐛 Fix bug that OAuth1 requests did not work anymore
This commit is contained in:
parent
c87382c086
commit
b73349a3a5
|
@ -241,6 +241,15 @@ export function requestOAuth1(this: IAllExecuteFunctions, credentialsType: strin
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
requestOptions.data = { ...requestOptions.qs, ...requestOptions.form };
|
requestOptions.data = { ...requestOptions.qs, ...requestOptions.form };
|
||||||
|
|
||||||
|
// Fixes issue that OAuth1 library only works with "url" property and not with "uri"
|
||||||
|
// @ts-ignore
|
||||||
|
if (requestOptions.uri && !requestOptions.url) {
|
||||||
|
// @ts-ignore
|
||||||
|
requestOptions.url = requestOptions.uri;
|
||||||
|
// @ts-ignore
|
||||||
|
delete requestOptions.uri;
|
||||||
|
}
|
||||||
|
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
requestOptions.headers = oauth.toHeader(oauth.authorize(requestOptions, token));
|
requestOptions.headers = oauth.toHeader(oauth.authorize(requestOptions, token));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue