Add WebID-OIDC authentication method#147
Conversation
src/index.js
Outdated
| config: require('../config'), | ||
| currentUser: auth.currentUser.bind(auth), | ||
| identity: require('./identity'), | ||
| login: auth.login.bind(auth), |
There was a problem hiding this comment.
I didn't see any tests in solid-auth-oidc for the login function, so I don't like the idea of swapping out a tested client.login for an untested one.
There was a problem hiding this comment.
Right-o, I will be adding tests to both login & logout.
There was a problem hiding this comment.
Added unit tests for login & logout, to solid-auth-oidc.
src/index.js
Outdated
| currentUser: auth.currentUser.bind(auth), | ||
| identity: require('./identity'), | ||
| login: auth.login.bind(auth), | ||
| logout: auth.logout.bind(auth), |
There was a problem hiding this comment.
Same goes for logout - no tests.
| 'node-fetch': 'fetch', | ||
| 'text-encoding': 'TextEncoder', | ||
| 'urlutils': 'URL', | ||
| 'webcrypto': 'crypto' |
There was a problem hiding this comment.
Are all these externals necessary? They're declared identically in solid-auth-oidc's webpack config.
There was a problem hiding this comment.
I'd love to find a way to not include them; haven't been able to get it to work without.
| @@ -0,0 +1,3 @@ | |||
| { | |||
| "presets": ["es2015"] | |||
There was a problem hiding this comment.
Mind also removing this in the package.json - https://github.com/solid/solid-client/blob/master/package.json#L27-L30
There was a problem hiding this comment.
Sure thing, will remove.
|
@dan-f Any other comments to address before this is merged? |
|
Let me take a look at those tests. |
|
Actually, is there a demo app to test this UI? |
|
That page 404s |
|
Argh, typo. https://solid.github.io/solid-auth-oidc/demo/ |
|
Nice. So when I click "log out" and refresh the page it appears that I'm still logged in. |
|
I'm also seeing an XHR for a "/goodbye" HTML page which seems a bit strange |
|
So after further discussion, it looks like we'll namespace the new auth method separately rather than replace |
|
@dan-f - the oidc auth is now namespaced, the default login & currentUser is re-bound to TLS. |
|
ok 👍 |
Implements issue #92.
Major changes:
solid.login()andsolid.currentUser()are switched over to use the WebID-OIDC auth client instead of WebID-TLS.login()andcurrentUser()are still accessible viasolid.tls.login()andsolid.tls.currentUser(), though these will be deprecated in future versions.solid.logout()is implemented.