meteor/meteor — pull request #1845 by chmac (2014-02-19 20:21:32+00:00)
Title: Let an existing user add new oauth credentials to their account.

Inside Accounts.updateOrCreateUserFromExternalService() we check if the user is currently logged in, and if they are, we add the service to their existing user account. This allows a logged in user to call `Meteor.loginWithFacebook();` and add a Facebook oauth connection to their current user account.

Need to add a test to `accounts_test.js`. However, in order to do that, I need to mock the `Meteor.userId()` function. Any pointers on how to do that?

Question: Is this patch likely to be accepted? I think it makes sense, we've discussed it here at the Berlin Meteor meetup and the consensus is it makes sense. If so, I'll add the tests.