Problems with 3rd party login services


#1

I have integrated and properly configured Facebook and Twitter login, however they only work when this code is added:

Accounts.onCreateUser(function (options, user) { return user; });

If I remove the code above I am receiving the following error:
Exception while invoking method 'login' undefined

Any ideas why?


#2

I also get the same error with the following code:

Accounts.onCreateUser(function (options, user) { if (options.profile) user.profile = options.profile; return user; });


#3

Fixed.

It was due to a validation error in the schema for profile.name