MozillaReality / FirefoxReality

INACTIVE - A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
https://mzl.la/reality
Mozilla Public License 2.0
768 stars 217 forks source link

Let you set the name of your device / FxR instance or delete old ones #2494

Closed joshmarinacci closed 1 month ago

joshmarinacci commented 4 years ago

Is your feature request related to a problem? Please describe. When I send a tab to a device from my desktop Firefox I see several devices called Oculus Quest. This is probably because I have installed and then removed FxR several times.

Describe the solution you'd like There should be a way to list all of my devices, to rename them (so they aren't all called Firefox Reality on Oculus Quest) and delete devices I don't need anymore.

bluemarvin commented 4 years ago

The accounts api currently does not support this. You have to do all device management from https://accounts.firefox.com/

joshmarinacci commented 4 years ago

Until this is possible we should have a button in the settings somewhere to jump to this page so people can edit it there.

jvonitter commented 4 years ago

Yeah, it wouldn't be too hard to put a link in account settings (https://accounts.firefox.com/settings/) so they can at least remove duplicate devices in the headset. At the same time, we have this problem more than most users will.

Putting this in our next polish milestone.

keianhzo commented 4 years ago

@emstanley @bluemarvin I've put together a UI for this, similar to what Desktop has:

Screen Shot 2020-06-23 at 10 43 15

The button doesn't have state and it just opens the settings URL in a new window. Is that what we want?

keianhzo commented 4 years ago

The method already exists in AS but it needs to be exposed in AC. Waiting until the add that. Pinged the AC team to see if they can add it to an upcoming sprint.

Related https://github.com/mozilla-mobile/android-components/issues/2824

grigoryk commented 4 years ago

One way to work-around the awkward device name duplication is to expose the "rename your current device" functionality.

Everything you'd need for this is in place:

accountManager.authenticatedAccount()
                    ?.deviceConstellation()
                    ?.setDeviceNameAsync(newValue, context)
                    ?.await()

Here's an example from Fenix's account settings UI: https://github.com/mozilla-mobile/fenix/blob/master/app/src/main/java/org/mozilla/fenix/settings/account/AccountSettingsFragment.kt#L290-L304

Actual "account management" functionality is trickier than just putting a button linking to FxA settings page. For that page to be auto-logged-in, you'd need to be using the webchannel-based FxA integration. Otherwise, user would need to manually type-in their credentials (not great on mobile, doubly so in VR).

Even with that in place, there are certain actions that a user can take on that settings page which currently won't be handled well by the FxA integration (for example, password change, primary email change). This is something that we'll need to work through on the a-c/a-s side still.

So my recommendation for now is to expose "set device name" functionality in the FxR account UI, and eventually we'll be able to land proper "account management" functionality.

keianhzo commented 4 years ago

Thanks @grigoryk! We should have updated the issue title, this issue evolved from device management to account management at some point and that's the reason why we wanted to use the getManageAccountUrl method.

FxA WebChannels has already landed in FxR so we should be ok with that, but given that there still some missing functionality and that it's probably going to take a while to expose it maybe we can re purpose this issue and just fix the original device management issue and open another one for the general account management page.

keianhzo commented 4 years ago

Opened a different issue for the Manage Account feature as it's going to take a while: https://github.com/MozillaReality/FirefoxReality/issues/3564