By: Amaury OIDC user 20 Apr 2018 at 10:34 a.m. CDT

1 Response
Amaury OIDC gravatar
Hi, i'm using Passportjs for google authentification. I can login into google. However during the callback (when passport try to exchange the authorization code against ID and access token) passport cannot join google as i'm behind a corporate proxy. I see two way of solving this : - Try to edit passport (with a globalproxy for example) to access google through the proxy - Try to edit passport to be linked to another Openid Provider (like keycloak in which i already did a google auth behind a proxy) Bonus question : i didn't saw a way in the GUI to remove the existing social provider Lynkedin and Facebook, should i have ? I'm in no hurry. Maybe this is a little off topic as it's mostly concerning passport. If someone has another idea, a hint, or some experience to share : That would be more than welcome. Thanks for any clue Amaury

By Amaury OIDC user 23 Apr 2018 at 3:32 a.m. CDT

Amaury OIDC gravatar
Hi, i managed to enable proxy with the passport component, here is what i did in case someone had the same issue and found this post : #add the dependency > vim /opt/gluu/node/passport/package.json #add the line > "global-tunnel-ng": "^2.1.1", #add node and npm tp the path > PATH="$PATH:/opt/node-v6.9.1-linux-x64/bin/" #add the proxy to npm (you must have the variable http proxy and https proxy set) > npm config set proxy $http_proxy > > npm config set https-proxy $https_proxy #download the dependency > cd /opt/gluu/node/passport/ > > npm update > > > vim /opt/gluu/node/passport/server/app.js #add this to the file after the require > //Manual add for the proxy > > var globalTunnel = require('global-tunnel-ng'); > > process.env.http_proxy = 'http://myproxy:8080'; > > process.env.https_proxy = 'http://myproxy:8080'; > > globalTunnel.initialize(); #Then do a > service passport restart ready to use My environement variable were not present in the script (didn't searched a lot why) i had to reset them If i should have put this information somewhere else, put a comment and i'll change it. I'll try to connect passport to another OP, if it's not easy i'll put the answer here as well edit : i'm ok with this solution, i'm closing this issue so i don't polute to much the active queue