Add OAuth to HubSpot Trigger node credentials (#2166)

* 🔨 HubSpot Trigger node credentials

*  Small changes

*  Add breaking change message

Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
This commit is contained in:
Harshil Agrawal
2021-09-18 22:18:35 +02:00
committed by GitHub
parent 469ac1d912
commit 5ea4dc03b8
3 changed files with 61 additions and 17 deletions

View File

@@ -370,15 +370,11 @@ export class HubspotTrigger implements INodeType {
return {};
}
// check signare if client secret is defined
if (credentials.clientSecret !== '') {
const hash = `${credentials!.clientSecret}${JSON.stringify(bodyData)}`;
const signature = createHash('sha256').update(hash).digest('hex');
//@ts-ignore
if (signature !== headerData['x-hubspot-signature']) {
return {};
}
const hash = `${credentials!.clientSecret}${JSON.stringify(bodyData)}`;
const signature = createHash('sha256').update(hash).digest('hex');
//@ts-ignore
if (signature !== headerData['x-hubspot-signature']) {
return {};
}
for (let i = 0; i < bodyData.length; i++) {