mozilla / PyFxA

Python library for interacting with the Firefox Accounts ecosystem
Other
31 stars 20 forks source link

Firefox shows "Firefox is now syncing with (null)" when logging in via PyFxA #50

Closed kewisch closed 7 years ago

kewisch commented 7 years ago

STR:

1) Install pyamo from https://github.com/kewisch/pyamo 2) Make sure you are logged in to Firefox Sync in Firefox 3) Run amo info lightning (*)

Result:

Expected:

Other Details: Happens both with PyFxA 0.3.0 from pip and latest master.

The code that calls PyFxA can be found here: https://github.com/kewisch/pyamo/blob/master/pyamo/utils.py#L62

(*) This command will likely fail with a message that you don't have permissions, but the notification in Firefox appears just after entering your password for me. If you want to test a command that works with a normal AMO account then you can use amo upload, but that will actually upload an xpi file to one of your add-ons.

rfk commented 7 years ago

Notes to self: what I think is happening is that here:

https://github.com/kewisch/pyamo/blob/master/pyamo/utils.py#L69

It calls session.get_identity_assertion(audience), which results in a call to /certificate/sign on the auth-server, which because it doesn't specify ?service=XXX parameter, makes us assume that you're a device accessing sync. The server responds by creating a placeholder device record, sending push notifications to other connected devices, and so-on.

I think the simplest fix here, is to arrange for PyFxA to send a ?service=<client_id> query parameter when signing the certificate, although the current structure of the API might make that difficult.

shane-tomlinson commented 7 years ago

@rfk - can you triage this bug?