By: Cu kal user 05 Mar 2020 at 8:15 a.m. CST

4 Responses
Cu kal gravatar
I have passport working with ADFS & Azure AD-SAML2.0. I'm trying to add in Azure OAuth authentication. I followed the guide at https://gluu.org/docs/ce/4.0/authn-guide/inbound-oauth-passport/. I tried adding these Strategies by installing the npm packages. passport-azure-ad-oauth2 passport-azure-ad I continued adding a Provider but when restarting Passport I get this error regardless of which strategy I try to set up: ``` 2020-03-05T10:42:45.789Z [INFO] Setting up strategy for provider AzureOAuth 2020-03-05T10:42:45.790Z [DEBUG] Provider data is { "id": "AzureOAuth", "displayName": "AzureOAuth", "type": "oauth", "mapping": "windowslive", "passportStrategyId": "passport-azure-ad", "enabled": true, "callbackUrl": "https://<SNIPPED>/passport/auth/AzureOAuth/callback", "requestForEmail": false, "emailLinkingSafe": false, "options": { "clientID": "<SNIPPED>", "clientSecret": "<SNIPPED>", "callbackURL": "<SNIPPED>", "consumerKey": "<SNIPPED>", "consumerSecret": "<SNIPPED>" }, "passportAuthnParams": {} } 2020-03-05T10:42:45.790Z [INFO] Loading node module passport-azure-ad 2020-03-05T10:42:45.974Z [VERBOSE] Adding to list of known strategies 2020-03-05T10:42:45.981Z [ERROR] TypeError: strategy is not a constructor 2020-03-05T10:42:45.981Z [DEBUG] TypeError: strategy is not a constructor at setupStrategy (/opt/gluu/node/passport/server/providers.js:71:20) at forEach (/opt/gluu/node/passport/node_modules/ramda/src/forEach.js:45:5) at /opt/gluu/node/passport/node_modules/ramda/src/internal/_checkForMethod.js:22:72 at Object.f2 [as forEach] (/opt/gluu/node/passport/node_modules/ramda/src/internal/_curry2.js:29:14) at Object.setup (/opt/gluu/node/passport/server/providers.js:204:5) at reconfigure (/opt/gluu/node/passport/server/app.js:82:12) at process._tickCallback (internal/process/next_tick.js:68:7) ``` Is it possible to add a new OAuth strategy like this or does it also require rewriting the passport js files? Thanks for any help

By Aliaksandr Samuseu staff 05 Mar 2020 at 8:59 a.m. CST

Aliaksandr Samuseu gravatar
Hi, Cu kal. An indepth question like this isn't usually covered by Community support. We can't afford assigning a developer to assist our free users with coding tasks, unfortunately. You may consider purchasing a support plan that will cover it, if your budget allows. Though, if you'll manage to find a solution and will be willing to share it with the rest of community, let us know - we'll add this use case to our docs.

By Cu kal user 05 Mar 2020 at 9:56 a.m. CST

Cu kal gravatar
Hello Aliaksandr, thanks for your reply, I understand that. Is there a way to hire a developer to do this or does it require a full support plan?

By Aliaksandr Samuseu staff 05 Mar 2020 at 10:27 a.m. CST

Aliaksandr Samuseu gravatar
I believe Gluu accepted "bounties" for implementing features certain organizations needed a few times in the past. I don't know if such offer is still the thing these days. But if you consider paying somebody for implementing it for you, I think we have [several partners](https://www.gluu.org/partners-service/) which specialize in integrations, so you could try to deal with them.

By Michael Schwartz Account Admin 05 Mar 2020 at 12:24 p.m. CST

Michael Schwartz gravatar
Gluu has a partnership program. Existing partners are listed on https://gluu.org/partners Any companies interested in becoming partners can reach out to us.