<div dir="ltr"><div><div>I don't have much understanding on how packaged apps and app URIs work, but I know the OAuth side :)<br><br></div>You could try this: register a client for BuddyUp, with the redirect_uri pointing at (assuming Firefox OS supports this) `buddy-up://oauth/return`. You'll receive the query parameters `code` and `state`. You could then either, a) finish the dance by POSTing the code and client_secret straight to the OAuth server from the device, or b) POST the code to the sumo server, and allow it to fetch the token, store it in the db, and return it to the packaged app.<br><br></div>a) has the downside of needing the secret to be packaged into the app, which is probably a no-go.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 5, 2014 at 5:17 PM, Michael Cooper <span dir="ltr"><<a href="mailto:mcooper@mozilla.com" target="_blank">mcooper@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I was reading the docs for Firefox Accounts [0]. They say that to become a<br>
relying service, we need to email to get a client ID and secret to use Firefox<br>
Account's OAuth2 provider.<br>
<br>
BuddyUp is an app that consumes SUMO APIs to provide a platform for users to<br>
ask and answer questions. Simply put, it's a Q/A app. We hope to have it<br>
installed by default in the future, and it will be a packaged app.<br>
<br>
I have a few questions about the OAuth process. Would it be possible to make<br>
the redirect URI a link into an app? It would be preferable if the app could<br>
get the OAuth callback directly, instead of SUMO having to some how relaunch<br>
the app.<br>
<br>
If that isn't possible, do you have any advice for using the OAuth flow from<br>
inside an app? I suppose it would also be possible to use the native BrowserID<br>
inspired APIs, but I understand that the OAuth2 flow is the preferred way going<br>
forward.<br>
<br>
Thanks,<br>
--Mike Cooper<br>
<br>
[0]: <a href="https://developer.mozilla.org/en-US/Firefox_Accounts#Firefox_OS" target="_blank">https://developer.mozilla.org/en-US/Firefox_Accounts#Firefox_OS</a><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>
</blockquote></div><br></div>