-
Notifications
You must be signed in to change notification settings - Fork 121
Set fxa device name for standalone mobile libraries via user agent #1889
Comments
/cc @philbooth who has the most experience with our current user-agent-parsing logic |
If you do the device registration before doing the call to get a signed certificate, then the push notification should go out with the updated name. |
Regardless of doing explicit registration or not, I'm a big 👍 to using a consistent UA format and to us doing some sensible parse of it on the server side. |
It seems OK to me, more-or-less in line with the amount of info sent in other UA strings in other contexts. We treat UA strings as potential PII in all our metrics infrastructure on the backend.
I expect we'll do our best to only allow this for Official Mozilla Apps, and I'm not sure there's anything much we can do to prevent forgeries anyways. A malicious app can always talk directly to the server with whatever UA it wants.
I think it should, yes. Having to work with two slightly-different formats across FxA and Sync has a slight pain in the past, and I don't recall the distinction delivering any value in practice. |
I'm 100% cool with both the UA string and the device name as proposed.
If we're all agreed on that UA string format, we could get it in to FxA train 88 which should ship early-June-ish if my maths is right. Any good? |
@philbooth 👍 Let's do it! |
@philbooth How can I find out which train this ended up on and when it'll be in release? |
@mcomella, this will be part of FxA train 88, which we will cut on Monday. Deployment times tend to be somewhat fuzzy but it should go live roughly 2 weeks from now. Waves hands about. I've made a note to CC you in the deploy bug when it gets created, that is probably the surest way to keep you in the loop. But if you want an independent signal then you're looking for when this endpoint returns Sorry I can't be more precise! |
Hey @philbooth. The endpoint returns Any ideas what's going on? My user agent is |
Sigh, my bad regex skills are going on, that's what. I'll add the one above as an extra test-case and make sure it passes. This will be on train 90, which won't be deployed for a couple of weeks-ish. Sorry for the delay. |
Hey @philbooth – would there be any way for me to test this before it hits release? |
@mcomella you could try pointing your app at https://nightly.dev.lcip.org/ which should have the changes within 24 hours. |
Testing is blocked in the nightly build because of mozilla/fxa-dev#330 |
@mcomella, this should now be on stage, you can point your app here: |
I'm creating a standalone sync library for Android (and there's a counterpart on iOS) and these should have reasonable names in the fxa device list. Currently, my device name is showing up as
Firefox @MOZ_APP_VERSION@, Android
, which I believe is getting set from my user agent (see code in userAgent.js) when I request my account to go from Engaged to Married.Proposal
I propose we standardize the user agent for these libraries so the server can properly set the device name on sign-in (or Engaged->Married). The user agent may want to take into account (including debugging info):
While the device name, for the user, should specify:
For user agent, I propose:
("Mobile" is consistent with our request for the sign-in context)
Which can be parsed to the initial device name:
For context, the current iOS user agent looks roughly like:
Thoughts on my proposal? What kind of timeline can we expect for an implementation?
Questions:
A possible work-around is to call
POST /v1/account/device
after the initial connection but this is an inferior solution because 1) push will notify open Firefox browsers with the initial name and 2) it's an extra request.CC @liuche @rfk
The text was updated successfully, but these errors were encountered: