Skip to content

Instantly share code, notes, and snippets.

@adamsrog
Last active August 29, 2015 14:19
Show Gist options
  • Save adamsrog/fc1d1dcf60be2dc34b14 to your computer and use it in GitHub Desktop.
Save adamsrog/fc1d1dcf60be2dc34b14 to your computer and use it in GitHub Desktop.
// for @sunoceansand from comments on http://blog.willrax.com/oauth-with-firebase-and-ember
// change the login() in emberfire.js like so:
login: function() {
var _this = this; // cache this for usage within the Ember.RSVP.Promise
return new Ember.RSVP.Promise(function(resolve, reject) {
_this.get("ref").authWithOAuthPopup("facebook", function(error, user) {
if (user) {
resolve(user);
} else {
reject(error);
}
},
{
remember: "sessionOnly",
scope: "email"
});
});
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment