Facebook OAuth refresh token flow
Meteor currently reads an access token from an oauth provider, for example Facebook, when logging in, and stores this on user.services.facebook.accessToken. The access token is used on subsequent HTTP calls to Facebook, for example when the app wants to act on behalf of the user. This isn't sufficient:
- If a user logs into a Meteor app using Facebook, and then logs out of Facebook (but not out of the Meteor app), and that Meteor app uses the accessToken to act on behalf of the user, that won't work.
- The app developer can work around this by implementing the access token refresh logic themselves (since they'll be doing the HTTP call to Facebook themselves directly anyways)
- Meteor could make this experience better by supplying a wrapper around HTTP calls to facebook that use the access token, which would also refresh it as needed. This way the app developer doesn't have to think about this at all.
https://developers.facebook.com/blog/post/2011/05/13/how-to--handle-expired-access-tokens/
original discussion thread: https://groups.google.com/forum/?fromgroups=#!topic/meteor-talk/piWqeSyG4LI
Please add google support.
I'll look into this if you like. I need this anyway. I like the wrapper idea.
That would be awesome! On Nov 16, 2012 10:25 AM, "Scott Burch" [email protected] wrote:
I'll look into this if you like. I need this anyway. I like the wrapper idea.
— Reply to this email directly or view it on GitHubhttps://github.com/meteor/meteor/issues/444#issuecomment-10456643.
On it.
@scottburch has some sample code of a HTTP wrapper that refreshes tokens for OAuth on another issue: https://github.com/meteor/meteor/pull/464#issuecomment-10502154. Thanks, Scott!
I believe this is a Pull Request trying to address this issue for Google accounts: https://github.com/meteor/meteor/pull/495
Is there any recent news on this?
Before thanksgiving there was some activity in merging the dependent pull request, but no activity that I have seen since then. You can merge in our branches and it seems to work fine.
I would like to see this move forward because I am currently merging the meteor branches into mine to keep my project working.
Is there any way I can apply this on an existing 0.5.2 meteor?
Sorry for the delay. I'll get #464 which this is dependent on merged in today.
On Mon, Dec 3, 2012 at 8:45 AM, Joscha Feth [email protected]:
Is there any way I can apply this on an existing 0.5.2 meteor?
— Reply to this email directly or view it on GitHubhttps://github.com/meteor/meteor/issues/444#issuecomment-10960711.
This issue has had its name changed several times and a lot of the functionality referred to in comments above has been implemented. What's left is the stuff described in this blog post:
https://developers.facebook.com/blog/post/2011/05/13/how-to--handle-expired-access-tokens/
Both Facebook's manual Oauth flow and Meteor's facebook-oauth package have changed quite a bit since this issue was opened. There has been no activity/interest in this issue in 4+ years, so the time has come to close it off. Thanks all!