athombv / node-homey-oauth2app

This module does the heavy lifting for a Homey App that talks to any OAuth2 Web API.
https://athombv.github.io/node-homey-oauth2app/
5 stars 5 forks source link

Use wrapped to select fetch implementation based on node version #92

Closed bobvandevijver closed 8 months ago

bobvandevijver commented 8 months ago

RobinBol commented 8 months ago

There seems to an issue with the specific combination: Node.js v18 and the node-fetch npm module. When using this combination, Cloudflare security service detects an "online attack":

<h2 data-translate="blocked_why_headline">Why have I been blocked?</h2>
<p data-translate="blocked_why_detail">This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.</p>
</div>

Using the native fetch (available as of Node.js v18), this issue is resolved.