julianlam / nodebb-plugin-sso-twitter

NodeBB Plugin that allows users to login/register via their Twitter account.
BSD 2-Clause "Simplified" License
9 stars 8 forks source link

User registration error when installed together with plugin-user-invitations #19

Closed agusputra closed 8 years ago

agusputra commented 8 years ago

I have installed sso-twitter and user-invitations together. And NodeBB error/restarted when I tried to register using sso-twitter.

Here is the log :

23/12 11:19 [17626] - error: TypeError: Cannot read property 'toLowerCase' of undefined
    at Object.UserInvitations.acceptInvite [as method] (/home/user1/Projects/yukoding/node_modules/nodebb-plugin-newuser-invitation/library.js:338:26)
    at /home/user1/Projects/yukoding/src/plugins/hooks.js:121:12
    at /home/user1/Projects/yukoding/node_modules/async/lib/async.js:181:20
    at Object.async.forEachOf.async.eachOf (/home/user1/Projects/yukoding/node_modules/async/lib/async.js:233:13)
    at Object.async.forEach.async.each (/home/user1/Projects/yukoding/node_modules/async/lib/async.js:209:22)
    at fireActionHook (/home/user1/Projects/yukoding/src/plugins/hooks.js:112:9)
    at Object.Plugins.fireHook (/home/user1/Projects/yukoding/src/plugins/hooks.js:73:5)
    at /home/user1/Projects/yukoding/src/user/create.js:136:15
    at fn (/home/user1/Projects/yukoding/node_modules/async/lib/async.js:741:34)
    at /home/user1/Projects/yukoding/node_modules/async/lib/async.js:1208:16
TypeError: Cannot read property 'toLowerCase' of undefined
    at Object.UserInvitations.acceptInvite [as method] (/home/user1/Projects/yukoding/node_modules/nodebb-plugin-newuser-invitation/library.js:338:26)
    at /home/user1/Projects/yukoding/src/plugins/hooks.js:121:12
    at /home/user1/Projects/yukoding/node_modules/async/lib/async.js:181:20
    at Object.async.forEachOf.async.eachOf (/home/user1/Projects/yukoding/node_modules/async/lib/async.js:233:13)
    at Object.async.forEach.async.each (/home/user1/Projects/yukoding/node_modules/async/lib/async.js:209:22)
    at fireActionHook (/home/user1/Projects/yukoding/src/plugins/hooks.js:112:9)
    at Object.Plugins.fireHook (/home/user1/Projects/yukoding/src/plugins/hooks.js:73:5)
    at /home/user1/Projects/yukoding/src/user/create.js:136:15
    at fn (/home/user1/Projects/yukoding/node_modules/async/lib/async.js:741:34)
    at /home/user1/Projects/yukoding/node_modules/async/lib/async.js:1208:16
23/12 11:19 [17626] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
23/12 11:19 [17626] - info: [app] Database connection closed.
23/12 11:19 [17626] - info: [app] Web server closed to connections.
23/12 11:19 [17626] - info: [app] Shutdown complete.
[cluster] Child Process (17626) has exited (code: 1, signal: null)

The error comes from user-invitations, but I think this has to do with sso-twitter. I can register without error after I disabled plugin-user-invitations.

I also submit new issue to : https://github.com/NodeBB-Community/nodebb-plugin-user-invitations/issues/12

NodeBB v0.9.3 sso-twitter v1.1.1 user-invitations v0.3.2

julianlam commented 8 years ago

Seems issue is related to the user invitations plugin. If you disabled it and registration works, then it is not this plugin's faultfault.

yariplus commented 8 years ago

user-invitations uses emails, and sso-twitter doesn't pull emails. Not really a bug with sso-twitter.

yariplus commented 8 years ago

:P