voicis / nodebb-plugin-sso-battle.net

SSO for battlenet
MIT License
1 stars 0 forks source link

Error #1

Closed kubaboski closed 7 years ago

kubaboski commented 7 years ago

Hi, I get this error on callback /auth/battlenet/callback Internal server error

16/12 18:04 [9605] - error: /auth/battlenet/callback
 AuthorizationError: Internal server error
    at OAuth2Strategy.authenticate (/opt/bitnami/apps/gadia/htdocs/node_modules/passport-oauth2/lib/strategy.js:131:25)
    at attempt (/opt/bitnami/apps/gadia/htdocs/node_modules/passport/lib/middleware/authenticate.js:348:16)
    at authenticate (/opt/bitnami/apps/gadia/htdocs/node_modules/passport/lib/middleware/authenticate.js:349:7)
    at Layer.handle [as handle_request] (/opt/bitnami/apps/gadia/htdocs/node_modules/express/lib/router/layer.js:95:5)
    at next (/opt/bitnami/apps/gadia/htdocs/node_modules/express/lib/router/route.js:131:13)
    at Route.dispatch (/opt/bitnami/apps/gadia/htdocs/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/opt/bitnami/apps/gadia/htdocs/node_modules/express/lib/router/layer.js:95:5)
    at /opt/bitnami/apps/gadia/htdocs/node_modules/express/lib/router/index.js:277:22
    at Function.process_params (/opt/bitnami/apps/gadia/htdocs/node_modules/express/lib/router/index.js:330:12)
    at next (/opt/bitnami/apps/gadia/htdocs/node_modules/express/lib/router/index.js:271:10)
    at Function.handle (/opt/bitnami/apps/gadia/htdocs/node_modules/express/lib/router/index.js:176:3)
    at router (/opt/bitnami/apps/gadia/htdocs/node_modules/express/lib/router/index.js:46:12)
    at Layer.handle [as handle_request] (/opt/bitnami/apps/gadia/htdocs/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/opt/bitnami/apps/gadia/htdocs/node_modules/express/lib/router/index.js:312:13)
    at /opt/bitnami/apps/gadia/htdocs/node_modules/express/lib/router/index.js:280:7
    at Function.process_params (/opt/bitnami/apps/gadia/htdocs/node_modules/express/lib/router/index.js:330:12)
voicis commented 7 years ago

Hi, are you sure that you have configured it correctly from the admin panel (api key/secret etc.)?

Also changes to the settings are applied only after you have restarted nodebb.

Does this happen when you are creating a new user or associating already an existing one or during log in?

kubaboski commented 7 years ago

Hello, credentials are ok, even now I've made new ones and the effect is the same. The node was rebuild and restarted each every time.

On creating new user this happens, when I finish my auth on the battle.net page On logging in when I click the button

Look: http://gadia.pl/login

voicis commented 7 years ago

Looks like the callback url might be the issue, it is http (not https). OAuth requires SSL.

kubaboski commented 7 years ago

Ok, I've changed to https seems it's better and it should work, I will check it later.

A tip: This kind of integration could be nice: https://xenforo.com/community/resources/steam-authentication-integration.1336/

kubaboski commented 7 years ago

Ok, checked it, now it works.