Expose the function that gets fb data from an access token #7550
Conversation
@gsabran: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
@Meteor-Bot done :) |
Thanks @gsabran, seems reasonable. |
@gsabran are you interested in further maintaining the facebook packages? We are looking for maintainers for some of our more peripheral packages. |
I'm happy to contribute when it's easy for me! I'm still the only dev at my startup so I don't have much extra bandwidth. And I'd rather not take responsibilities I can't honor. That being said, I'm happy to contribute as much as I can. So I'd rather not tell you that I'd maintain the package, but I'll try to be helpful. I'm working on integrating 3rd parties services from mobile clients with a Meteor backend. They (so far for Facebook at least) have flows that differ from web based oauth. I'll make PR when I think it makes sense to bring more flexibility in the accounts packages. |
@gsabran Thank you for your commit, I am just looking into authenticating FB/Google the same way as you proposed for mobile apps. What do you think about Google, could it be done the same way? |
I haven't look into Google yet, but will probably soon. If that's helpful, here's the full code I'm been using things for Facebook mobile auth in my code: https://gist.github.com/gsabran/8bab053beb05a0a5bf871b4caa00f9b6 |
@gsabran Thank you |
It's possible to get an access token directly, for instance with mobile application. To make it easier to handle those access tokens on the backend, I split the function that handles the token from the larger function that starts with the code.
This enables things like handling fb login directly from an access token: