Hi!

Well that's actually what I meant, I was referring to packaged applications.

However, you *can* actually make it work by using the Token flow outlined in 
https://developer.foursquare.com/overview/auth#token and combining it with a 
static page hosted at the registered redirect uri (no actual server-side logic 
is needed, just some clever client js to extract the returned token from the 
url hash and postMessage it back to the app).

Still, that requires a "server-side" component, although static in nature.

See earlier discussion on the topic in:
https://groups.google.com/d/topic/mozilla.dev.b2g/IWFEZNpQuM0/discussion

Flaki


On Sunday, April 21, 2013 3:32:26 PM UTC+2, Mathieu Rochette wrote:
> Hi,
> 
> 
> 
> it's possible to implement OAUTH in firefox os without server code, but 
> 
> only for an hosted app (you can use a session web worker or 
> 
> localStorage with setInterval to communicate between the original 
> 
> application page and the page the user is redirected to). But once 
> 
> you're in a packaged app it's not possible anymore.
> 
> If things continue to go Fabrice started, we will be able to declare 
> 
> redirect urls in the app manifest (for privileged or certified app), eg 
> 
> :
> 
> 
> 
> "redirects": [{
> 
>   "from": 
> 
> "http://mydomain.tld/the/redirect/url/i/indicated/to/the/oauth/provider";,
> 
>   "to": "/my/app/redirect/page.html"
> 
> }]
> 
> 
> 
> This looks like a really fine solution to me and I hope it will soon be 
> 
> available :)
> 
> 
> 
> On Sun 21 Apr 2013 03:11:39 PM CEST, Flaki wrote:
> 
> > On Sunday, April 21, 2013 1:05:29 AM UTC+2, Mathieu Rochette wrote:
> 
> >> Hi,
> 
> >>
> 
> >>
> 
> >>
> 
> >> I'm building an app that need the systemXHR permission so I need it to
> 
> >>
> 
> >> be a packaged app. This app[1] is using the Foursquare API and I need to
> 
> >>
> 
> >> register my app "rediect URI" in foursquare 'for the oauth
> 
> >>
> 
> >> authentification). So my question is: How are packaged app UUID calculated?
> 
> >>
> 
> >> Is it attributed by the marketplace? then it's somewhat ok I can edit
> 
> >>
> 
> >> the URI after submission but it makes testing harder (when the simulator
> 
> >>
> 
> >> generate a packaged app). will the UUID changes if I upload a new
> 
> >>
> 
> >> version of the app to the marketplace? not much of a problem as I can
> 
> >>
> 
> >> specify multiple "redirect URI" (but might be a problem with other
> 
> >>
> 
> >> services?)
> 
> >>
> 
> >> or is the UUID  calculated on the device? and then that's a bigger
> 
> >>
> 
> >> problem because it means I'll have to redirect the user to server of
> 
> >>
> 
> >> mine (which should not be needed IMHO)
> 
> >>
> 
> >>
> 
> >>
> 
> >>
> 
> >>
> 
> >> thank you,
> 
> >>
> 
> >>
> 
> >>
> 
> >>
> 
> >>
> 
> >> [1] http://place.texthtml.net/ (hosted version, systemXHR will be
> 
> >>
> 
> >> required to upload photos)
> 
> >>
> 
> >>
> 
> >>
> 
> >> -- Mathieu Rochette
> 
> >
> 
> > Hi Mathieu!
> 
> >
> 
> > If I understand correctly you are trying to back-direct the user into the 
> > application after successful authentication, which is not possible at the 
> > moment in Firefox OS.
> 
> >
> 
> > AFAIK currently there seems to be no way to implement OAUTH authentication 
> > as a third party without any server code.
> 
> >
> 
> > Also, stefan, that bug seems to be restricted in access, I get the message 
> > "You are not authorized to access bug #852848."
> 
> > _______________________________________________
> 
> > dev-b2g mailing list
> 
> > [email protected]
> 
> > https://lists.mozilla.org/listinfo/dev-b2g

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to