Closed Bug 1221107 Opened 9 years ago Closed 9 years ago

Register device with Firefox Accounts "devices" API if user is signed in to Firefox Accounts

Categories

(Firefox :: Sync, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1227527

People

(Reporter: stomlinson, Assigned: stomlinson)

References

Details

(Whiteboard: [fxa])

As part of the "multi device" view in Firefox Accounts, Firefox devices with an existing FxA session need the ability to register themselves with the Firefox Accounts "devices" API without user interaction.

See:
* https://github.com/mozilla/fxa/blob/rfk/devices-view-requirements/features/FxA-16-devices-view/README.md
* https://github.com/mozilla/fxa/blob/phil/fxa-45-requirements/features/FxA-45-device-registration-api/README.md
Assignee: nobody → stomlinson
Blocks: 1221097
Depends on: 1221101
This seems almost the same as bug 1221105? ie, it seems the same basic "register" technique could be used in both cases and that it might be fragile if we expect the client to track with certainty whether a previous registration has been done or not. If that's not the case it would probably be helpful for me to understand the differences.
Mark, the difference between the two:

1221105 queries the devices API to see if a registered device's name has been changed from some other device, this bug is to automatically perform the registration if the user already has a Firefox Account session token but no FxA device ID. This feature is to register, without additional user interaction, devices where users have already signed up/in to FxA/Sync.

The two issues are closely related and may end up being handled by the same startup code. I opened distinct issues to ensure the two requirements are captured and appropriately handled.
> if we expect the client to track with certainty whether a previous registration has been done or not

Unless I misunderstand the requirements, FxA connected devices will receive an FxA specific device ID. The client will be responsible for storing the device ID and using it with any device related interactions with the FxA auth server. By virtue of having a device ID, a client will know whether it has been previously registered.
(In reply to Shane Tomlinson [:stomlinson] from comment #3)
> Unless I misunderstand the requirements, FxA connected devices will receive
> an FxA specific device ID. The client will be responsible for storing the
> device ID and using it with any device related interactions with the FxA
> auth server. By virtue of having a device ID, a client will know whether it
> has been previously registered.

IIRC, there was previous talk of allowing the device to specify its own ID, to ensure things continue to work OK with the existing device-id Sync already uses. The semantics of that are, roughly, that a guid is generated as Sync is connected, discarded on disconnect, and the ID used for things like executing remote commands (!) and synced-tabs.

(The front-end can obviously be flexible, but the nature of our release channels makes things trickier)
> IIRC, there was previous talk of allowing the device to specify its own ID

There was, and I got talked down from that position via a combination of :nalexander and :ckarlof arguing for server-generated IDs.  I believe the current plan is to use the FxA-generated device-id in place of the locally-generated sync id for newly-connected devices, but we'll have to think through whether and how that would work for devices that are already connected to sync.
Whiteboard: [fxa]
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.