Securing Node-RED
OAuth/OpenID based authentication with Id4
To use an external authentication source, Node-RED can take use a wide range of the strategies provided by Passport.
Steps as below:
-
In the node-red installation host, install passport-oauth2 module:
image.png -
In your Id4, add new client and remember set the "Client Secret" and add "authorization_code" as allowed grant type
- ClientID
- ClientSecret
- Allowed Grant type (authorization_code)
- redirect url
-
Then add/modify the following in your settings.js
image.png -
Results as below
image.png
Hope this can help you.