After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 755386 - Can't add Pocket account via Firefox account
Can't add Pocket account via Firefox account
Status: RESOLVED FIXED
Product: gnome-online-accounts
Classification: Core
Component: general
3.16.x
Other All
: Normal normal
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-09-22 07:28 UTC by Will Thompson
Modified: 2016-07-21 18:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pocket: Update README (863 bytes, patch)
2016-07-19 14:27 UTC, Debarshi Ray
committed Details | Review
oauth2: Split the WebKitDOM* symbols out of the main header (21.48 KB, patch)
2016-07-21 18:13 UTC, Debarshi Ray
committed Details | Review
oauth2: Add a new vfunc to influence the navigation policy (7.89 KB, patch)
2016-07-21 18:13 UTC, Debarshi Ray
committed Details | Review
oauth2: Call goa_oauth2_provider_decide_navigation_policy (1.56 KB, patch)
2016-07-21 18:14 UTC, Debarshi Ray
committed Details | Review
pocket: Reuse authorization URI (2.68 KB, patch)
2016-07-21 18:14 UTC, Debarshi Ray
committed Details | Review
pocket: Support logging in with a Firefox account (2.48 KB, patch)
2016-07-21 18:15 UTC, Debarshi Ray
committed Details | Review

Description Will Thompson 2015-09-22 07:28:36 UTC
You may know that it's possible to sign into Pocket using a Firefox account, as part of Mozilla embedding Pocket support into Firefox. (This works just like signing into Pocket using a Google account.) But I can't authorize GOA to access my Pocket account this way. Steps to reproduce:

1. Open the Online Accounts page in Control Center
2. Add Account → Pocket
3. On the “Log In and Authorize” page, choose “Log In with Firefox”
4. On the Firefox Account sign-in page, fill in credentials

I'd expect that now, either the dialog would just close, or I'd be re-prompted to authorize GNOME to access my Pocket account. But instead, I'm just shown my Pocket bookmarks within the GOA auth dialog, and https://getpocket.com/connected_applications confirms that GOA hasn't been authorized. Not sure whether this is Pocket's fault (totally possible!) or GOA's.

I'm using gnome-online-accounts-3.16.3-1.fc22.x86_64 and control-center-3.16.3-1.fc22.x86_64
Comment 1 Heiko Adams 2016-07-16 19:47:54 UTC
I can still confirm this issue on Gnome 3.20
Comment 2 Debarshi Ray 2016-07-19 14:27:21 UTC
When using a Firefox account, Pocket doesn't redirect to the redirect_uri specified by us and it breaks. Interestingly, this is not documented in https://getpocket.com/developer/docs/authentication

However, I found this slide deck that explains how to use a Firefox account with Pocket: http://www.slideshare.net/KuoE0/pocket-authentication-with-oauth-on-firefox-os
Comment 3 Debarshi Ray 2016-07-19 14:27:53 UTC
Created attachment 331786 [details] [review]
pocket: Update README
Comment 4 Debarshi Ray 2016-07-20 13:24:48 UTC
I am working on this in gnome-online-accounts:wip/rishi/pocket-firefox.

It is taking longer than it should because I ran into an issue with webkit2.h and webkit-web-extension.h. Some of the GoaProvider vfuncs are run in the UI process and the others in the web extension process, but WebKit2 explicitly prevents us from mixing up the headers in the same translation unit.
Comment 5 Debarshi Ray 2016-07-21 18:13:02 UTC
Created attachment 331905 [details] [review]
oauth2: Split the WebKitDOM* symbols out of the main header
Comment 6 Debarshi Ray 2016-07-21 18:13:35 UTC
Created attachment 331906 [details] [review]
oauth2: Add a new vfunc to influence the navigation policy
Comment 7 Debarshi Ray 2016-07-21 18:14:04 UTC
Created attachment 331907 [details] [review]
oauth2: Call goa_oauth2_provider_decide_navigation_policy
Comment 8 Debarshi Ray 2016-07-21 18:14:37 UTC
Created attachment 331908 [details] [review]
pocket: Reuse authorization URI
Comment 9 Debarshi Ray 2016-07-21 18:15:03 UTC
Created attachment 331909 [details] [review]
pocket: Support logging in with a Firefox account
Comment 10 Debarshi Ray 2016-07-21 18:22:54 UTC
Pushed to master.

The changes are a bit intrusive, so I don't want to put them in gnome-3-20 without some testing.