Closed Bug 1100679 Opened 10 years ago Closed 10 years ago

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

Categories

(Firefox OS Graveyard :: FxA, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: nick, Assigned: spenrose)

References

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?
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
Closed: 10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.