Last active
August 29, 2015 14:19
-
-
Save adamsrog/fc1d1dcf60be2dc34b14 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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