-
Notifications
You must be signed in to change notification settings - Fork 40
Call /logout endpoint when logging out #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call /logout endpoint when logging out #46
Conversation
Apply last updates from https://github.com/solid/solid-auth-client
…repository" This reverts commit 5522f0b.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to understand why the /logout
is needed in the first place. Also, this cannot be a GET
.
src/webid-oidc.js
Outdated
console.error(err) | ||
}) | ||
.then(x => { | ||
fetch(idp + '/logout', { method: 'GET', credentials: 'include'}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should move up, and there should only be one catch
block.
(Also, unsure why we're using the then/catch
syntax here instead of async/await
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, if this is a state-changing operation, this cannot be a GET
!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RubenVerborgh What must be used instead of GET
? The Solid-server has handler only for GET
request
router.get('/logout', LogoutRequest.handle)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's a bug in NSS: nodeSolidServer/node-solid-server#744
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RubenVerborgh I have fixed code GET was replaced with POST and call was moved up.
* master: (23 commits) Add download link. Publish builds in gh-pages branch. Update url-parse. Allow relative popupUri parameter. Make app name default to host. Remove obsolete CSS class. Clarify popup generation instructions. Update webpack. Update dependencies to resolve security vulnerabilities. Release version 2.0.0 of the npm package. Update critical vulnerability. Use ellipsis icon for other IDP. Set minimum width for buttons. Render custom IDP as regular button. Increase spacing between buttons. Increase popup font size. Show current host as IDP choice. login no longer returns a function. Remove firstSession function. Remove authType. ...
So I've been through this and tested it, but it doesn't work. While this code makes a call to To summarize: some of our dependencies need updates first in order for this to work. We'll have to wait on nodeSolidServer/oidc-auth-manager#20 for a proper fix. |
@RubenVerborgh I wrote already in => https://github.com/solid/node-solid-server/pull/701/files/20987f6ef23940805da58b611b4f64f95e897298#diff-237045f786d4918cf906b96a1c163eb9
The |
We don't; so we first need this to land on the server before we continue on the client side. But regardless, it does not seem like it's up to solid-auth-client to make this HTTP request, but rather to the OIDC library (which makes this request, but doesn't include cookies). |
@RubenVerborgh Ok, |
It's not okay, our OIDC versioning is problematic currently. This is because our oidc-module is a fork. @justinwb is looking into this. |
Like I mentioned in Gitter, we have a /different/ fix server side. And the logout API has changed to ‘logoutRequest()’ on the rp side. |
@dmitrizagidulin Main problem is that the |
Yep, in the process of doing so. |
@RubenVerborgh This fix isn't required, I rechecked all again. The problem was with:
|
@smalinin Indeed, that's what I also concluded in #46 (comment). I unfortunately went a bit too fast and have prepared nodeSolidServer/oidc-rp#11, but feel free to create your own. Won't merge until I hear back from you. |
Related issue: nodeSolidServer/oidc-auth-manager#20