-
Notifications
You must be signed in to change notification settings - Fork 7
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
Authentication error: hash fragment= not a valid redirect URL #60
Comments
@josephguillaume Thanks for the issue you can make a PR in the |
I wish I could, but I'll see if I can at least work on what the solution should be. removeOidcQueryParam is now no longer applied to redirectUrl when it is passed in by the client The only other normalisation I could find that might have been removed in that PR is
To reinstate the previous behaviour and close this issue, that's probably sufficient, but given that solid-logic is now responsible for normalising and this is now an explicit design choice, it feels like redirecting to the current page without a hash is rather arbitrary. Shouldn't mashlib just consistently redirect to it's homepage as is common with SPAs (i.e. the redirectUrl is always the same), and then use existing functionality to reinstate the correct URI? |
Turns out the specification of the redirectUrl actually occurs in solid-ui The handling of restoration of state also appears to be spread across both solid-ui and solid-logic. I'm not touching this, sorry. |
@timea-solid I'm not sure the above PR's are correctly resolving the problem. Could you check ? |
NSS tested locally with Watch on both PR's |
This may or may not be related to SolidOS/solidos#200, but clearly appears to be an error in how solidos is interacting with recent changes in the authentication library.
Go to a URL with a hash fragment, e.g. https://josephguillaume.solidcommunity.net/public/index.ttl#this
Try to login
Page shows an alert with error message: "https://josephguillaume.solidcommunity.net/public/index.ttl#this is not a valid redirect URL, it is either a malformed IRI or it includes a hash fragment"
It appears this message originates from here:
https://github.com/inrupt/solid-client-authn-js/blob/5bc1113604576dcff61b9284f8b736472bc42f4d/packages/node/src/ClientAuthentication.ts#L66
And is a result of a design change by which the authentication library no longer normalises redirect urls
inrupt/solid-client-authn-js#2643
I would guess that solid-logic needs to be updated to normalise the url before passing it in, but I haven't confirmed (apologies if this issue is in the wrong repo)
The possible link to SolidOS/solidos#200 is that the example in question ends up with a hash fragment for "state". I'm not sure where that's coming from, but it seems possible that error could be related to the same change in the authentication library.
The text was updated successfully, but these errors were encountered: