minego / macaw-enyo

An open source twitter client written in enyo 2
Other
38 stars 12 forks source link

Macaw works on Firefox OS but requires changes to redirect url #14

Open soapdog opened 10 years ago

soapdog commented 10 years ago

Hey Micah,

Project Macaw works great on Firefox OS but it requires some changes to the callback url.

My first idea was to bypass the whole callback url workflow by trapping the redirect using the "redirects" manifest field to pick a url and redirect to an internal page instead, as explained in:

https://developer.mozilla.org/en-US/Apps/Build/Manifest#redirects

The problem is that this only works with 3xx HTTP Redirects and I suspect that Twitter is not using an HTTP redirect but some meta refresh tag. So I can't really trap it.

There are a couple ways to go forward:

If we just host the pages you had on minego.net on a gh-pages branch, the app will just work and then we can work on publishing it on the Firefox Marketplace.

There are other things we could tweak and fix before publishing such as missing icon sizes and stuff but this issue here is the only one preventing it to work reliably.

minego commented 10 years ago

On 05/29/14 17:01, Andre Alves Garzia wrote:

Hey Micah,

Project Macaw works great on Firefox OS but it requires some changes to the callback url.

My first idea was to bypass the whole callback url workflow by trapping the redirect using the "redirects" manifest field to pick a url and redirect to an internal page instead, as explained in:

https://developer.mozilla.org/en-US/Apps/Build/Manifest#redirects

The problem is that this only works with 3xx HTTP Redirects and I suspect that Twitter is not using an HTTP redirect but some meta refresh tag. So I can't really trap it.

There are a couple ways to go forward:

  • Fix the SSL cert on minego.net and be happy because everything will just work.
  • Use github gh-pages branch to host a secure version of the callback pages and serve them. This will just work as well but will require changing the callback url to the Github pages one. (This is my recommended solution).
  • Refactor the authentication code to use the Browser API https://developer.mozilla.org/en-US/docs/DOM/Using_the_Browser_API. This is basically an iframe that is isolated from the rest of the application. Great for opening dialogs without interference. It will require some coding.

If we just host the pages you had on minego.net on a gh-pages branch, the app will just work and then we can work on publishing it on the Firefox Marketplace http://marketplace.firefox.com.

There are other things we could tweak and fix before publishing such as missing icon sizes and stuff but this issue here is the only one preventing it to work reliably.

— Reply to this email directly or view it on GitHub https://github.com/minego/macaw-enyo/issues/14.

I have installed a new cert on minego.net as a short term solution. I'd like to use the github gh-pages as a longer term solution.

soapdog commented 10 years ago

Cool! On my pull request for gh-pages I add a Makefile directive that will push to gh-pages for you. Bonus point is that it uses the SSL certificate from github. You may want to look into that for the long term.

In the mean while, the app zipfile is a bit large. There is a 10 megabytes image folder in the assets with a huge "old-images" folder. Is that needed or could it be deleted?

Ryuno-Ki commented 9 years ago

Hello, @soapdog.

Can you link to the pull request/commit hash for reference?

A task runner for builds could generate dedicated packages for each platform and hence may exclude the old-images (not present in 20bb4b6ffae287a40b823fda8be6c379769256fe). But that decision is up to @minego.

soapdog commented 9 years ago

As far as I know that was already fixed by @minego without my pull request...