You can, if you're a privileged app, specify an "origin" field in your manifest 
to have a fixed app:// URI:

  "origin": "app://my-app-uri/"

There's an unfortunate lack of docs surrounding that feature at the moment and 
it's also not going to be supported until B2G 1.1. That, however, should solve 
the problem.

See https://bugzilla.mozilla.org/show_bug.cgi?id=852720 for more information.




----- Original Message -----
From: "Peter Rukavina" <[email protected]>
To: [email protected]
Sent: Wednesday, July 10, 2013 1:57:54 PM
Subject: How to use Dropbox Datastore API without ability to specific redirect  
URI?

The new Dropbox Datastore API for JavaScript 
(https://www.dropbox.com/developers/datastore/docs/js) requires developers to 
register a redirect URI for its OAuth authentication to Dropbox. 

---snip---
The API does not allow a redirect URI to be specified as a parameter in the 
JavaScript authentication call, and so when Firefox OS apps attempt to use the 
API an error like this results:

Error (400)
It seems the app you were using submitted a bad request.
If you would like to report this error to the app's developer,
include the information below.

More details for developers

Invalid redirect_uri: \
"app://8b85b008-f796-024e-979f-ab8bbf5125f9/index.html".\
It must match one of the redirect URIs you've pre-configured for your app
---snip---

I asked Dropbox about this 
(https://forums.dropbox.com/topic.php?id=102866#post-556225) and the reply was:

---snip---
I'm afraid I don't know what options are available in Firefox OS. The redirect 
URI does indeed need to be specified ahead of time, for security reasons.
On other mobile platforms, like iOS and Android, apps are able to register 
themselves for app-specific callback URIs, and this is how they complete flows 
like OAuth 2.0. Is there something similar for Firefox OS?
---snip---

What are my options for Firefox OS?  As far as I can determine, the URI that 
Dropbox see as the "calling URI" -- 
app://8b85b008-f796-024e-979f-ab8bbf5125f9/index.html in my case -- isn't a 
constant and will change depending on the device the app is installed on. 
Correct?
_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps
_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps

Reply via email to