So trying to run a little test, I do run into problems
current config:
adminAuth: {
type:"strategy",
strategy: {
name: "keycloak",
label: 'Sign in with KeyCloak',
icon:"fa-key",
strategy: require("@exlinc/keycloak-passport"),
options: {
host: "https://auth.example.com",
realm: "MyRealm",
clientID: "node-red",
clientSecret: "433abd41-c893-48ea-aabb-ca22c8fc290c",
callbackURL: "https://example.com/auth/strategy/callback",
authorizationURL: "https://auth.example.com/auth/realms/MyRealm/protocol/openid-connect/auth",
tokenURL: "https://auth.example.com/auth/realms/MyRealm/protocol/openid-connect/token",
userInfoURL: "https://auth.example.com/auth/realms/MyRealm/protocol/openid-connect/userinfo"
},
verify: function(accessToken, refreshToken, profile, done) {
done(null, profile);
}
},
users: [
{ username: "me@example.com", permissions: ["*"]}
]
},
I get a error on the call back https://example.com/auth/strategy/callback
:
Error: Unknown authentication strategy "keycloak"
at attempt (/usr/lib/node_modules/node-red/node_modules/passport/lib/middleware/authenticate.js:186:37)
at authenticate (/usr/lib/node_modules/node-red/node_modules/passport/lib/middleware/authenticate.js:362:7)
at Layer.handle [as handle_request] (/usr/lib/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)
at next (/usr/lib/node_modules/node-red/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/usr/lib/node_modules/node-red/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/usr/lib/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)
at /usr/lib/node_modules/node-red/node_modules/express/lib/router/index.js:281:22
at Function.process_params (/usr/lib/node_modules/node-red/node_modules/express/lib/router/index.js:335:12)
at next (/usr/lib/node_modules/node-red/node_modules/express/lib/router/index.js:275:10)
at SessionStrategy.strategy.pass (/usr/lib/node_modules/node-red/node_modules/passport/lib/middleware/authenticate.js:338:9)