<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 13, 2015 at 3:02 PM, Kumar McMillan <span dir="ltr"><<a href="mailto:kmcmillan@mozilla.com" target="_blank">kmcmillan@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi all.<div><br></div><div>This is for Ryan Kelly (or anyone) to check what we’d like to do for payments to see if it’s sane. We started talking about it before but this email adds a few more details.</div><div><br></div><div>The goal: provide generic payment processing via Firefox Accounts so that any Mozilla site can sell premium services. The user should only have to log in *once* to purchase the product.</div><div><br></div><div>Abstract user flow:</div><div><br></div><div>- User decides to purchase 20GB more of Mozilla Backup storage for $9.99 / month (just an example)</div><div>- Click the purchase button</div><div>- Sign in with Firefox Account</div><div>- Enter credit card information</div><div>- Enjoy enhanced storage</div><div><br></div><div>Implementation proposal:</div><div><br></div><div>- On <a href="http://MozillaBackup.com" target="_blank">backup.firefox.com</a> , the click of a purchase button begins an OAuth flow by requesting a code->token with the scope ‘profile payments’</div><div>- <a href="http://MozillaBackup.com" target="_blank">backup.firefox.com</a> opens an iframe (or redirect) to <a href="http://payments.mozilla.com" target="_blank">payments.mozilla.com</a> and passes the OAuth token as a GET parameter</div><div>- <a href="http://payments.mozilla.com" target="_blank">payments.mozilla.com</a> verifies the token on the server and checks that it has the *payments* scope</div><div>- payment processing proceeds…</div></div></blockquote><div><br></div><div>I'm not an expert, but this seems odd. Suppose backup wanted to support multiple payment providers, or <a href="http://payments.mozilla.com">payments.mozilla.com</a> were run by a third-party. It wouldn't be sensible for backup to initiate the login flow; it would be sensible for backup to ask payments (or the appropriate payment provider) to initiate a payment flow, which for <a href="http://payments.mozilla.com">payments.mozilla.com</a> would know about FxA. (For some other provider, it would likely not.)<br><br></div><div>That is, it seems that the redirect flow should be split: backup and payments communicate with one redirect type of flow; and then payments and FxA communicate with a separate redirect flow.<br><br></div><div>Please critique.<br></div><div><br></div><div>Nick<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>Does that sound sane? This makes token sharing sound scary: <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Firefox_Accounts/Introduction#Security_considerations" target="_blank">https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Firefox_Accounts/Introduction#Security_considerations</a></div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div><div>-Kumar</div></font></span></div><br>_______________________________________________<br>
Dev-fxacct mailing list<br>
<a href="mailto:Dev-fxacct@mozilla.org">Dev-fxacct@mozilla.org</a><br>
<a href="https://mail.mozilla.org/listinfo/dev-fxacct" target="_blank">https://mail.mozilla.org/listinfo/dev-fxacct</a><br>
<br></blockquote></div><br></div></div>