-
Notifications
You must be signed in to change notification settings - Fork 18
On every command, a new device is added and a "New sign-in to Firefox" email is sent #28
Comments
Same here. |
Yeah, this is pretty annoying, I hit this myself today while digging in to #30. Unfortunately I don't think there's much we can do about it short-term - as far as the server can see, each time you run the script, it is in fact making a fresh login and looks basically like a Firefox gearing up to sync with the account. What we probably need to do here, is to do the login once, save the generated Firefox Accounts session token, and then re-use that for each subsequent request. Not sure how big a refactor that would be of the current code... |
Here I can read that browser id API is dead, is it in relation with browser id code in syncclient? |
Ok, seems only Firefox Sync is always based on Browser Id code. Another question: when looking at Epiphany source code, they are saving all this information, do you really think it's needed? void |
Unfortunately yes, access to sync still uses the BrowserID code. I'd like to move it to OAuth like everything else, but that's a pretty low-priority refactor because what's there now is working fine.
You will need @gnumdk does the current code talk directly to the auth-server API [1] to perform the login? If so, we should have a chat about moving it to use our "WebChannels" API which is sadly under-documented, but which provides much better decoupling between the browser and our backend server APIs. [1] https://github.com/mozilla/fxa-auth-server/blob/master/docs/api.md |
@rfk If you are talking about PyFxA, yes it seems to be using auth-server API. |
For restoring session (and bypass this issue), I'm saving sessionToken and kB.
But I get a: |
If you're getting as far as hitting that URL, then the saved sessionToken is working correctly. How are you restoring the value of kB from the saved session data? I would expect to see something like:
|
I miss it from copy/paste but it was in my code. |
I get it working by saving bid_assertion, is that wrong? |
The |
Added session.check_session_status() and it works :-) |
For anyone wondering how this may work(NOTE fxa_client = FxAClient()
if os.path.exists('session.pickle'):
previous_session = pickle.load(open('session.pickle'))
session = FxASession(fxa_client, args.login,
quick_stretch_password(args.login, args.password), previous_session.uid,
previous_session.token)
session.keys = previous_session.keys
session.check_session_status()
else:
session = fxa_client.login(args.login, args.password, keys=True)
session.fetch_keys()
pickle.dump(session, open('session.pickle', 'w'))
bid_assertion_args = get_browserid_assertion(session) |
[Version 0.9.0.dev0 sha 5f5d2d9, py3.4]
Not sure it's related to the client, but... It will fast be annoying ;)
PS this happen once #26 and #27 are solved (did this locally)
The text was updated successfully, but these errors were encountered: