Marketplace/FirefoxAccounts: Difference between revisions

added banner
(added banner)
 
(20 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Marketplace_banner}}
This page discusses how we'll integrate Firefox Accounts with the Marketplace, which currently uses Persona.
This page discusses how we'll integrate Firefox Accounts with the Marketplace, which currently uses Persona.


Line 15: Line 16:
Documentation: https://github.com/mozilla/fxa-oauth-server/blob/master/docs/api.md
Documentation: https://github.com/mozilla/fxa-oauth-server/blob/master/docs/api.md


Sample application: https://123done.dev.lcip.org/
Sample application: https://123done-prod.dev.lcip.org/


* Set up a Marketplace account on the Firefox Account server, which contains all the account and redirect information.
* Set up a Marketplace account on the Firefox Account server, which contains all the account and redirect information.
Line 21: Line 22:
* Login
* Login
** Add Log in button, that calls [https://github.com/mozilla/fxa-oauth-server/blob/master/docs/api.md#get-v1authorization /v1/authorization].
** Add Log in button, that calls [https://github.com/mozilla/fxa-oauth-server/blob/master/docs/api.md#get-v1authorization /v1/authorization].
** Add Sign in button, that calls the above URL slightly differently. Dependent bugs: https://github.com/mozilla/fxa-content-server/issues/980, https://github.com/mozilla/fxa-content-server/issues/1062,  https://github.com/mozilla/fxa-oauth-server/issues/50
** Add Sign up button, that calls the above URL slightly differently. Dependent bugs: https://github.com/mozilla/fxa-content-server/issues/980, https://github.com/mozilla/fxa-content-server/issues/1062,  https://github.com/mozilla/fxa-oauth-server/issues/50
** Add an insertial page to complete the log in? Or just bounce back to the original page. Upon receiving the response it:
** Add an interstitial page to complete the log in? Or just bounce back to the original page. Upon receiving the response it:
*** Calls POST [https://github.com/mozilla/fxa-oauth-server/blob/master/docs/api.md#post-v1token /v1/token]
*** Calls POST [https://github.com/mozilla/fxa-oauth-server/blob/master/docs/api.md#post-v1token /v1/token]
*** Sends resulting call to the profile server (undocumented [https://github.com/mozilla/fxa-profile-server/blob/master/lib/routes/email.js but on github])
*** Sends resulting call to the profile server (undocumented [https://github.com/mozilla/fxa-profile-server/blob/master/lib/routes/email.js but on github])
*** Matches the email up with users account in zamboni, or creates an account and signs the user in, by creating a session.
*** Matches the email up with users account in zamboni, or creates an account and signs the user in, by creating a session.
*** [CK]: Don't forget to fetch user's UID from the profile server! The UID is guaranteed to be stable for a user, but the user may choose to change the email associated with the account.
*** Redirects the user back to the original page.
*** Redirects the user back to the original page.
* Logout
* Logout
Line 34: Line 36:
On Firefox 2.0, we'll use the native Firefox Accounts.
On Firefox 2.0, we'll use the native Firefox Accounts.


* Write up here: https://id.etherpad.mozilla.org/tracing-mozId-API
* Developer walkthrough of the implementation: https://wiki.mozilla.org/Marketplace/FirefoxAccounts/FxOS_Control_Flow
* See also: https://github.com/mozilla-b2g/gaia/blob/master/dev_apps/uitest/js/API/fxa.js#L29
* See also: https://github.com/mozilla-b2g/gaia/blob/master/dev_apps/uitest/js/API/fxa.js#L29


Line 60: Line 62:
*** When Firefox Accounts returns, assert the email addresses match (already done)
*** When Firefox Accounts returns, assert the email addresses match (already done)
*** Restart the payment flow
*** Restart the payment flow
* '''New''' First Purchase should get (and store) agreement to terms of service and privacy notice
** When user makes his first purchase, he must agree to Terms of Service and Privacy Notice
== Delivery Milestones ==
# Web integration
## Developer hub [done]
## Fireplace [done]
## Stats
## Comm badge
# FFx 2.0 integration [in review]
# Payments integration
# Payments FFx 2.0 flow
# Edge cases


== Migration ==
== Migration ==
'''Out of scope''' since this isn't directly related to Firefox Accounts, but a general user management tool.


Persona users allowed users to login with '''unverified emails''', Firefox Accounts does not. If a user has an unverified email they will have to log in to Firefox Accounts with a new email. In this case the record of paid apps and listing of apps on '''My Apps''' on the server will be inaccurate. This will never really affect a user until they try to purchase a previously installed app.
Persona users allowed users to login with '''unverified emails''', Firefox Accounts does not. If a user has an unverified email they will have to log in to Firefox Accounts with a new email. In this case the record of paid apps and listing of apps on '''My Apps''' on the server will be inaccurate. This will never really affect a user until they try to purchase a previously installed app.
Line 68: Line 85:


* Add in a move account page to the admin lookup pages
* Add in a move account page to the admin lookup pages
** Takes two user accounts, listing all purchases and installed records
** Takes two user accounts, listing all purchases and installed records {{Bugzilla|1030462}}
** Moves all app purchases and installed records from account A to account B
** Moves all app purchases and installed records from account A to account B {{Bugzilla|1030461}}


== Go live ==
== Go live ==
   
   
* Message users, let them know its going to happen.
* Message users, let them know its going to happen.
* Then delete all the old persona code.
* Then delete all the old persona code.  
 
== Stats ==
 
You must be logged into the Mozilla VPN to see these graphs. Each time a user is converted from Persona to Firefox Accounts, this chart should go up by one:
 
* [https://graphite-phx1.mozilla.org/render/?width=580&height=308&vtitle=count&target=stats.marketplace-dev.z.mkt.user.fxa&from=-30days&title=Persona%20to%20Firefox%20Account%20Conversions Development]
 
* [https://graphite-phx1.mozilla.org/render/?width=580&height=308&vtitle=count&target=stats.marketplace-stage.z.mkt.user.fxa&from=-30days&title=Persona%20to%20Firefox%20Account%20Conversions Stage]
 
* [http://graphite.nag.mktmon.services.phx1.mozilla.com/render/?width=586&height=308&_salt=1415735150.571&target=stats.marketplace.z.mkt.user.fxa&from=-30days&title=Persona%20to%20Firefox%20Account%20Conversions Production]
 
== Marketplace Login Flow ==
== Marketplace Login Flow ==
Flow diagram of actions requiring a user login such as purchasing or adding a review.  It illustrates the decision points for calling a login flow or account migration flow.
Flow diagram of actions requiring a user login such as purchasing or adding a review.  It illustrates the decision points for calling a login flow or account migration flow.
Line 110: Line 138:
# Whether a previous Persona-based Marketplace account exists and whether the FxAccount is already associated with it.
# Whether a previous Persona-based Marketplace account exists and whether the FxAccount is already associated with it.
[https://docs.google.com/spreadsheets/d/1qTFGaR_4J_IvBerK48u-wzYfhugJZsr6EEVTdCpvZKo/edit?usp=sharing End to End User Stories and Test Cases]
[https://docs.google.com/spreadsheets/d/1qTFGaR_4J_IvBerK48u-wzYfhugJZsr6EEVTdCpvZKo/edit?usp=sharing End to End User Stories and Test Cases]
====Out of Scope Use Cases====
# User with unverified persona id, no real email who has also paid for apps will not be able to recover purchases with their new Fx Accounts ID
# User with a verified persona id, and now a verified Fx Account email, who has previously downloaded paid apps will NOT have a way to associate the paid app with their new account (no migration tool)


Tracking/Test Bug for End-to-End Stories:
Tracking/Test Bug for End-to-End Stories:
Confirmed users
745

edits