-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix: logout from both idp and app #60
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/components/Header/Header.tsx
Outdated
const isUrl = (candidateUrl: string | URL) => { | ||
try { | ||
// If url is not URL-shaped, this will throw. | ||
// eslint-disable-next-line no-new | ||
new URL(candidateUrl); | ||
return true; | ||
} catch (_e) { | ||
return false; | ||
} | ||
}; |
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.
Can you try removing this, and using a call to URL.canParse
instead? It's a fairly recent addition to browsers, but I think because we are transpiling the code targeting an older EcmaScript version we should be good there and not become unaccessible for older browsers.
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'm not having any problems locally either when running the tests nor the app itself, but URL.canParse
is causing some failures on the Vercel deployment as well as in the e2e execution. Do you have any ideas on how to fix that?
* Added comments on the new logout handler function. * Replaced local function isUrl by URL.canParse. * Adjusted post-logout URL construction. * Updated logout flow in e2e login tests.
- Updated @inrupt/solid-client-authn-browser and @inrupt/solid-client-authn-node to last version, with the bug fix for the parsing of clientAppId. - Added a workaround for URL.canParse as lint was complaining about it. - Updated index e2e test as it was before to check if it still needs the change.
Fix: logging out of OPs that support Solid-OIDC and those that do not.
Description of changes
When logging out from an OP, AMC was sending a post-logout URL as part of the metadata used in DCR. This is incorrect for those OPs that don't support Solid-OIDC Client Identifiers, resulting in an error being shown to the user.
AMC now distinguishes between OPs supporting Solid-OIDC and those that do not, logging the user out accordingly.
User testing instructions
Commit checklist
Design requirements checklist