FxA Account creation should open email app then call onsuccess or onerror

RESOLVED INVALID

Status

Firefox OS
FxA
RESOLVED INVALID
3 years ago
3 years ago

People

(Reporter: \, Assigned: Sam Penrose)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

When a user has never linked their email account to FxA, and is on device, the first time they create a password, they are told to check their email, then navigator.mozId onerror fires.

This makes it confusing to new users who don't understand that they need to verify their email accounts to proceed.

I was wondering, instead of erroring right after telling the use that they need to authenticate, could we use a mozActivity to open the email client, then call onsuccess or onerror?
(Assignee)

Comment 1

3 years ago
This is a poor FxA design experience for relying applications such as WMW. We may be able to clean it up in 2.2 via bug 1098519 . In the meantime, Jared, is there any FMD code we can draw on to meliorate the badness for WMW?
Flags: needinfo?(6a68)
(In reply to Nick Desaulniers [:\n] from comment #0)
> When a user has never linked their email account to FxA, and is on device,
> the first time they create a password, they are told to check their email,
> then navigator.mozId onerror fires.
> 
> This makes it confusing to new users who don't understand that they need to
> verify their email accounts to proceed.
> 
> I was wondering, instead of erroring right after telling the use that they
> need to authenticate, could we use a mozActivity to open the email client,
> then call onsuccess or onerror?

When onerror fires, it returns an error object. You can check the error type and, if it's the unverified account error, you can show whatever UI you want. FMD does that here:

  https://github.com/mozilla-b2g/gaia/blob/master/apps/settings/js/findmydevice.js#L39-L40

I don't know if you can open a mozActivity not in response to a direct user click action, but maybe you could say something like "you need to verify your email to continue. click here to switch to the email app," then fire the mozActivity on click.
Flags: needinfo?(6a68)
I'm going to go ahead and close this bug, based on the title, seems like you now have enough info to know how to proceed.

Feel free to reopen if you have other questions.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.