Logging in programmatically from another application
-
@jewa what Node version? Try Node 6 if you're on a newer version.
-
@jewa you shouldn't need to downgrade then. Any version of Node 6.x.x should work.
-
@julian I am on nodebb version 1.4.3 not sure if that is develop branch as I am not so good with git. Yes it is not related. I just wanted to isolate the cause of my failure to log in programmatically by hosting on Heroku and trying it from there.
I followed the steps here: https://community.nodebb.org/topic/9049/getting-nodebb-and-plugins-setup-with-heroku-and-mongodb
and then modified web.js line 34 inside the install folder to port = process.env.PORT || port; Otherwise, it would load at port 4567 which was always failing. I think I also added process.env.PORT to line 145 in loader.js but I don't think that changed anything much. It only started nodebb when I modified web.js
-
@julian I have ditched Heroku. Deployed the app on cloud9 and it is working fine. I then try to use my plugin and I still get the same error. Here is the error on nodebb
at OAuth2Strategy._createOAuthError (/home/ubuntu/workspace/node_modules/nodebb-plugin-sso-oauth/node_modules/passport-oauth/node_modules/passport-oauth2/lib/strategy.js:379:17) at /home/ubuntu/workspace/node_modules/nodebb-plugin-sso-oauth/node_modules/passport-oauth/node_modules/passport-oauth2/lib/strategy.js:166:45 at /home/ubuntu/workspace/node_modules/nodebb-plugin-sso-oauth/node_modules/passport-oauth/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:191:18 at passBackControl (/home/ubuntu/workspace/node_modules/nodebb-plugin-sso-oauth/node_modules/passport-oauth/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:132:9) at IncomingMessage.<anonymous> (/home/ubuntu/workspace/node_modules/nodebb-plugin-sso-oauth/node_modules/passport-oauth/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:157:7) at emitNone (events.js:72:20) at IncomingMessage.emit (events.js:166:7) at endReadableNT (_stream_readable.js:921:12) at nextTickCallbackWith2Args (node.js:442:9)
I am really frustrated I have searched the internet for help the only help I get is with respect to a possible typo or firewall. My authorization codes are being created in my database it is just at the exchange point that the failure happens.
It is a pretty awful user experience to log into the forum after logging into my web app.
Would definitely be using nodebb for a stand-alone forum but this is me giving up after a 4 day battle. I might as well have built a very simple forum for my website in those 4 days. Ugh!!!