<div dir="ltr"><div><div><div><div>Hi Ryan,<br><br></div>Currently the Firefox Account doesn't provide an integrated login experience on Firefox OS. For example, user need to typing password again for using Pocket service even if they've already login in FxA in settings app.<br><br></div>On Firefox Desktop user can simply grant site permission on fx account login page when FxA is already login in browser, without typing password again. I think this is done by using IdentityManager API [1].<br><br></div>I don't know why we didn't apply the same technology on Firefox OS in the past, but it'll enable 3rd-party service on TV with better login experience because typing is a painful task on TV. We can leverage navigator.mozId with some adjustment of permission model of "moz-firefox-accounts".<br></div><div><div><div><br>[1] <a href="https://developer.mozilla.org/en-US/docs/Web/API/IdentityManager">https://developer.mozilla.org/en-US/docs/Web/API/IdentityManager</a><br><div><div><div><div><div><div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div>Best Regards,<br>Shih-Chiang Chien<br></div>Mozilla Taiwan<br></div></div></div>
<br><div class="gmail_quote">On Thu, Aug 27, 2015 at 7:27 PM, Tommy Kuo <span dir="ltr"><<a href="mailto:tokuo@mozilla.com" target="_blank">tokuo@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">Add Evelyn Huang and Shih-Chiang Chien.</div> <br> <div><div style="font-family:helvetica,arial;font-size:13px">-- <br><p style="font-family:Helvetica,Arial,sans-serif;font-size:10px;line-height:12px;color:rgb(33,33,33)"><span style="font-weight:bold;display:inline">Tommy Kuo</span>
<span style="display:inline">/</span> <span style="display:inline">Software Engineer</span>
<span style="display:block"></span>
<a href="mailto:kuoe0@mozilla.com" style="color:rgb(71,124,204);text-decoration:none;display:inline" target="_blank">kuoe0@mozilla.com</a><span></span></p>
<p style="font-family:Helvetica,Arial,sans-serif;font-size:10px;line-height:12px">
<span style="font-weight:bold;color:rgb(33,33,33);display:inline">Mozilla Taiwan</span></p></div></div> <br><p style="color:rgb(0,0,0)">On August 25, 2015 at 21:35:26, Fernando Moreno (<a href="mailto:fmoreno@mozilla.com" target="_blank">fmoreno@mozilla.com</a>) wrote:</p> <blockquote type="cite"><span><div><div></div><div>
<div dir="ltr">Hello,<br>
<div class="gmail_extra"><br></div>
<div class="gmail_extra">
<div class="gmail_quote">On Tue, Aug 25, 2015 at 7:38 AM, Ryan
Kelly <span dir="ltr"><<a href="mailto:rfkelly@mozilla.com" target="_blank">rfkelly@mozilla.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On 21/08/2015 17:30, Tommy Kuo wrote:<br>
>> Do you want to display the pocket website, make calls to
the pocket API,<br>
>> or both? Will you be running from a privileged system app
or an<br>
>> installable webapp?<br>
><br>
> We want to use the Pocket API only in a privileged app. We’ll
integrate<br>
> Pocket service into our TV.<br>
><br>
>> I'm not very familiar with the mozId API. Can you use it
to generate<br>
>> assertions for any audience? From what I can see in [3]
it's only<br>
>> possible to generate assertions for your app origin.<br>
><br>
> I’m trying to decode the assertion generated from
FindMyDevice. I found<br>
> audience is "<a href="https://find.firefox.com" rel="noreferrer" target="_blank">https://find.firefox.com</a>”, so I
think we can generate any<br>
> audience in the assertion.<br>
><br>
> If we can use the native mozId API, it is convenient to users
that they<br>
> don’t need to enter their username/password again. And we can
exchange<br>
> the assertion for a FxA OAuth token or a Pocket access token.
Do you<br>
> know someone is familiar with mozId?<br>
<br>
Casting a wide net here...<br>
<br>
IIRC Jared Hirsch (cc'd) did some work on it a while ago, but the
code<br>
hasn't been very active for some time. Fernando Moreno and
Michiel de<br>
Jong (also cc'd) are working on some Firefox Accounts integrations
in<br>
FxOS so they might be able to offer some insight.<br>
<br>
Jared, Fernando, Michiel, there's extra context below, but the
broad ask<br>
here is that Tommy's team would like to connect to Pocket from
Firefox<br>
OS, and Pocket authenticates using the FxA OAuth API.<br>
<br>
Do you know of any existing code in Firefox OS that's using the
FxA<br>
OAuth APIs?<br></blockquote>
<div><br></div>
<div>I played with [1] a few months ago while working on a
prototype for the New Gaia Architecture project [2], but AFAIK
there is no any other existing FxOS code using the FxA OAuth
APIs.<br></div>
<div><br></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
If not, a more specific question that would let us work towards
that is:<br>
can a privileged app use the mozId API to produce a FxA assertion
for<br>
any target audience?<br>
<br></blockquote>
<div><br></div>
<div>Yes, you should be able to specify any target audience with
some restrictions. Check [3]. I think in your case your Pocket app
will be shipped as a certified app, so you should be able to use
mozId the same way FindMyDevice does.<br>
<br></div>
<div>Cheers,<br>
<br></div>
<div>/ Fernando<br></div>
<div><br>
[1] <a href="https://github.com/mozilla/fxa-relier-client" target="_blank">https://github.com/mozilla/fxa-relier-client</a><br>
[2] <a href="https://github.com/fxos/contacts" target="_blank">https://github.com/fxos/contacts</a><br>
[3] <a href="https://mxr.mozilla.org/mozilla-central/source/dom/identity/nsDOMIdentity.js#617" target="_blank">
https://mxr.mozilla.org/mozilla-central/source/dom/identity/nsDOMIdentity.js#617</a><br>
</div>
</div>
</div>
</div>
</div></div></span></blockquote></div></blockquote></div><br></div></div></div></div></div></div></div></div></div></div></div>