nodeSolidServer / solid-auth-client

A browser library for performing authenticated requests to Solid pods
https://solid.github.io/solid-auth-client/
MIT License
95 stars 42 forks source link

add support for app:// in localStorage #121

Closed jeff-zucker closed 4 years ago

RubenVerborgh commented 5 years ago

Can you fix the build?

jeff-zucker commented 5 years ago

Sorry, working on it.

jeff-zucker commented 5 years ago

I'm afraid I am not getting very far. I can build and then use the bundle in an HTML page but I can never get the tests to succeed. I have the same problem with tests when I clone, install, and test your master branch. With either your master or my fork, I get:

 PASS  src/__test__/url-util.spec.js
 PASS  src/__test__/popup.spec.js
 FAIL  src/__test__/solid-auth-client.spec.js
  ● Console
    console.warn src/webid-oidc.js:22
      Error logging in with WebID-OIDC
coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.4%) to 82.67% when pulling 97a8e6251451b285345499f2715a868dbcbd06e1 on jeff-zucker:master into 186236c5ebaa8b7f474f8f8ab3d38d15c06e101c on solid:master.

jeff-zucker commented 5 years ago

@RubenVerborgh I think I have fixed the PR but I have a more basic question. If we require solid-rest-browser in solid-auth-client, the consumer will need to have solid-rest-browser locally installed where the solid-auth-client can find it. Users will not be able to use CDN for either package. (or do I have this wrong?) If I'm correct in this, wouldn't it be better to just let the consumer pull in a window.appfetch function with a CDN for solid-rest-browser which could then be used in solid-auth-client without a require?

RubenVerborgh commented 5 years ago

If we require solid-rest-browser in solid-auth-client, the consumer will need to have solid-rest-browser locally installed where the solid-auth-client can find it. Users will not be able to use CDN for either package.

Not locally: they can use anything that exposes window['solid-rest-browser]` as it is currently coded.

If I'm correct in this, wouldn't it be better to just let the consumer pull in a window.appfetch function with a CDN for solid-rest-browser which could then be used in solid-auth-client without a require?

Could be; then you want to change https://github.com/solid/solid-auth-client/pull/121/files#diff-bfe8e6023b4bd1049ee37f8e6ff32a7bR33 into 'solid-rest-browser': "window".

jeff-zucker commented 5 years ago

Thanks much for the responses, I'll dig back into it.

jeff-zucker commented 5 years ago

:-( try again ...

jeff-zucker commented 4 years ago

I have recently got solid-rest working with browserFS which supports native file system API, indexDB, Dropbox, and many other backends. I'm submitting a PR to hand off app:// URIs. It expects the user to bring their own solid-rest so no import or dependencies are needed.

Closing this and reopening with new PR.