Skip to content

Instantly share code, notes, and snippets.

@ayal
Created May 1, 2013 19:28
Show Gist options
  • Save ayal/5497685 to your computer and use it in GitHub Desktop.
Save ayal/5497685 to your computer and use it in GitHub Desktop.
autologin = function(){
var state = Meteor.uuid();
$.get('/_oauth/facebook?close&state=' + state +
'&access_token=' +
FB.getAccessToken(), function() {
Meteor.call('login', {oauth: {state: state}}, function(e, result) {
Accounts._makeClientLoggedIn(result.id, result.token);
});
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment