{"library":"node-red-contrib-oauth2","title":"Node-RED OAuth2 Authentication Node","description":"The `node-red-contrib-oauth2` package provides a specialized Node-RED node designed to streamline OAuth2 authentication flows within Node-RED environments. Its primary function is to facilitate the acquisition of access tokens from an OAuth2 server, which can then be seamlessly integrated into subsequent Node-RED nodes for making authenticated API requests. The current stable version is 6.2.1, with recent updates in May 2024, indicating an active development lifecycle and consistent release cadence. Notable features in recent versions include enhanced support for the OAuth2 implicit flow and a configurable option to force token refreshes. This node differentiates itself by abstracting complex OAuth2 mechanics into a visually configurable component within the Node-RED visual programming paradigm, supporting both static and dynamic credential management across various OAuth2 grant types, including Authorization Code, Client Credentials, Password, and Implicit flows.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install node-red-contrib-oauth2"],"cli":null},"imports":["npm install node-red-contrib-oauth2","Drag and drop the 'oauth2' node from the Node-RED editor palette onto your flow.","Configure the 'oauth2' node's properties (Client ID, Secret, Authorization URL, Token URL, Grant Type, Scopes, etc.) within its dialog box in the Node-RED editor."],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"[\n  {\"id\":\"d15d33a4fa9a8ad9\",\"type\":\"tab\",\"label\":\"node-red-contrib-oauth2\",\"disabled\":false,\"info\":\"\",\"env\":[]},\n  {\"id\":\"7e1a2f9059f99060\",\"type\":\"group\",\"z\":\"d15d33a4fa9a8ad9\",\"g\":\"368ef084fe6b53de\",\"name\":\"REFRESH\",\"style\":{\"label\":true,\"stroke\":\"#7f7f7f\",\"color\":\"#000000\",\"fill\":\"#bfdbef\"},\"nodes\":[\"d1ba341040cea0c3\",\"aa24d69faa1640cd\",\"efd1a2a910ca1051\",\"a8fca004e704e071\",\"9e9332c792dbdc01\",\"7f22873286146e83\"],\"x\":76,\"y\":499,\"w\":1210,\"h\":208},\n  {\"id\":\"7f22873286146e83\",\"type\":\"group\",\"z\":\"d15d33a4fa9a8ad9\",\"g\":\"7e1a2f9059f99060\",\"name\":\"via HTTP REQUEST\",\"style\":{\"label\":true},\"nodes\":[\"64d9243f.b7be7c\",\"31727a2c.05a026\",\"4030c52c.c2c29c\",\"3b67977c.a53c08\"],\"x\":102,\"y\":599,\"w\":1158,\"h\":82},\n  {\"id\":\"54025cb0a19e0f14\",\"type\":\"group\",\"z\":\"d15d33a4fa9a8ad9\",\"g\":\"368ef084fe6b53de\",\"name\":\"Client Credentials\",\"style\":{\"label\":true,\"stroke\":\"#a4a4a4\",\"color\":\"#ffffff\",\"fill\":\"#3f93cf\"},\"nodes\":[\"10de26226e66ea9e\",\"147aae5c70a7eecb\",\"1e2169485cd2be43\",\"ca6a8cddea946ab2\",\"c6d4eb5c867902eb\",\"d7a2041ef2683870\",\"3f5a09c4fc8e769f\"],\"x\":74,\"y\":179,\"w\":1212,\"h\":142},\n  {\"id\":\"f37b3410d0e03c57\",\"type\":\"group\",\"z\":\"d15d33a4fa9a8ad9\",\"g\":\"368ef084fe6b53de\",\"name\":\"Authorization Code\",\"style\":{\"label\":true,\"fill\":\"#3f93cf\",\"color\":\"#ffffff\"},\"nodes\":[\"8bd177259bc473f4\",\"ee86852f62926632\",\"d340377991d2d9b9\",\"9e4d3edfde1766b9\"],\"x\":74,\"y\":59,\"w\":1212,\"h\":82},\n  {\"id\":\"a783ce686ac81a0c\",\"type\":\"group\",\"z\":\"d15d33a4fa9a8ad9\",\"g\":\"368ef084fe6b53de\",\"name\":\"Password\",\"style\":{\"label\":true,\"fill\":\"#3f93cf\",\"color\":\"#ffffff\"},\"nodes\":[\"5ff7fb2616706080\",\"8eadc61e4e5b4ac2\",\"d857d0bc3e90d394\",\"95745c4253c151f0\",\"dcbde702eae7191d\",\"d6a9695a923ab18b\",\"c5da03044bdca6f1\"],\"x\":74,\"y\":339,\"w\":1212,\"h\":142},\n  {\"id\":\"368ef084fe6b53de\",\"type\":\"group\",\"z\":\"d15d33a4fa9a8ad9\",\"name\":\"Grant Type\",\"style\":{\"label\":true,\"fill\":\"#bfc7d7\",\"color\":\"#0070c0\"},\"nodes\":[\"7e1a2f9059f99060\",\"54025cb0a19e0f14\",\"f37b3410d0e03c57\",\"a783ce686ac81a0c\"],\"x\":48,\"y\":33,\"w\":1264,\"h\":700},\n  {\"id\":\"ee86852f62926632\",\"type\":\"oauth2\",\"z\":\"d15d33a4fa9a8ad9\",\"g\":\"f37b3410d0e03c57\"}\n]","lang":"json","description":"This Node-RED flow demonstrates various OAuth2 grant types (Authorization Code, Client Credentials, Password) and how to manage token refresh. It provides a visual representation of obtaining and utilizing access tokens within a Node-RED environment for authenticated API requests.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}