remotestorage / remotestorage.js

⬡ JavaScript client library for integrating remoteStorage in apps
https://remotestoragejs.readthedocs.io
MIT License
2.32k stars 141 forks source link

error with 5apps account #49

Closed jancborchardt closed 12 years ago

jancborchardt commented 12 years ago

Docrastinate now gives an error when trying to connect to my 5apps remoteStorage. The redirector kept reloading and appending »#error=invalid_client« to the web address, resulting in:

http://localhost/docrastinate/syncer/dialog.html#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client

The console looked like this:

ready state changed to: /docrastinate/syncer/include.js:13 Object /docrastinate/syncer/include.js:13 XHR finished loading: "http://50.116.62.47/js/chromeServerV45.js". XHR finished loading: "https://5apps.com/.well-known/host-meta". XHR finished loading: "https://5apps.com/webfinger?q=acct:jan@5apps.com". ready state changed to: /docrastinate/syncer/include.js:13 Object /docrastinate/syncer/include.js:13 XHR finished loading: "http://66.228.34.50/js/chromeServerV45.js". XHR finished loading: "https://5apps.com/.well-known/host-meta". XHR finished loading: "https://5apps.com/webfinger?q=acct:jan@5apps.com". ready state changed to: include.js:13 Object syncing: false proto: Object include.js:13 XHR finished loading: "http://50.116.62.47/js/chromeServerV45.js". XHR finished loading: "http://66.228.34.50/js/chromeServerV45.js". GET http://proxy.unhosted.org/irisCouchCheck?q=acct:jan@5apps.com include.js:3 ready state changed to: include.js:13 Object include.js:13 ready state changed to: include.js:13 Object include.js:13 ready state changed to: include.js:13 …

Eventually showing on the page: »Oops! That didn't work for "jan@5apps.com". Are you sure you have remote storage at that address? If not, get a user address with remote storage.«

Any idea?

michielbdejong commented 12 years ago

you can't use localhost. point some domain name (like whatever.dev or something) to 127.0.0.1 in your /etc/hosts, and use that instead. otherwise, use pagekite.

On Wed, Jun 27, 2012 at 12:43 AM, Jan-Christoph Borchardt reply@reply.github.com wrote:

I was trying to use docrastinate locally and had an error when trying to connect to my 5apps remoteStorage. The redirector kept reloading and appending »#error=invalid_client« to the web address, resulting in:

http://localhost/docrastinate/syncer/dialog.html#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client#error=invalid_client

The console looked like this:

ready state changed to: /docrastinate/syncer/include.js:13 Object  /docrastinate/syncer/include.js:13 XHR finished loading: "http://50.116.62.47/js/chromeServerV45.js". XHR finished loading: "https://5apps.com/.well-known/host-meta". XHR finished loading: "https://5apps.com/webfinger?q=acct:jan@5apps.com". ready state changed to: /docrastinate/syncer/include.js:13 Object  /docrastinate/syncer/include.js:13 XHR finished loading: "http://66.228.34.50/js/chromeServerV45.js". XHR finished loading: "https://5apps.com/.well-known/host-meta". XHR finished loading: "https://5apps.com/webfinger?q=acct:jan@5apps.com". ready state changed to: include.js:13 Object syncing: false proto: Object  include.js:13 XHR finished loading: "http://50.116.62.47/js/chromeServerV45.js". XHR finished loading: "http://66.228.34.50/js/chromeServerV45.js". GET http://proxy.unhosted.org/irisCouchCheck?q=acct:jan@5apps.com  include.js:3 ready state changed to: include.js:13 Object  include.js:13 ready state changed to: include.js:13 Object  include.js:13 ready state changed to: include.js:13 …

Any idea?


Reply to this email directly or view it on GitHub: https://github.com/unhosted/remoteStorage.js/issues/49

jancborchardt commented 12 years ago

Turns out it’s not related to localhost, but rather probably an issue with 5apps, confirmed by Luis.

@skddc @galfert do you know what could be the problem? It seems to work with OwnCube.

galfert commented 12 years ago

We recently implemented a check that the client_id must be equal to the hostname of the redirect_uri, like @michielbdejong suggested. It seems that docrastinate uses the full redirect_uri for the client_id instead of just the hostname. That caused our check to fail.

I removed the check for now so that it works again. A proper fix is on its way.

michielbdejong commented 12 years ago

ok, we haven't done proper deprecation dates until now, and this is obviously needed. we should deprecate 0.6.8, but probably the best way to do this (saving people double work) is to deprecate 0.6.* and below on 15 August. Then you can put the check back on that date, and if an app is still not on v0.7 then, it will be the app's fault.

On Wed, Jun 27, 2012 at 12:06 PM, Garret Alfert reply@reply.github.com wrote:

We recently implemented a check that the client_id must be equal to the hostname of the redirect_uri, like @michielbdejong suggested. It seems that docrastinate uses the full redirect_uri for the client_id instead of just the hostname. That caused our check to fail.

I removed the check for now so that it works again. A proper fix is on its way.


Reply to this email directly or view it on GitHub: https://github.com/unhosted/remoteStorage.js/issues/49#issuecomment-6598309