couchbase/sync_gateway — pull request #371 by pegli (2014-07-15 16:17:01+00:00)
Title: Add descriptive error for Facebook auth when email is missing

A user can configure their privacy settings in Facebook to hide their email address, in which case an email is not returned from a call to /me. When automatic provisioning is turned on, this causes user creation to fail. I've added a check to rest.makeSessionFromEmail which will log a specific error message in this case. No functional changes were made to the gateway.

In the long term, I think it would be a better idea to use the Facebook UID instead of the email address for the username.