Skip to content
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

Origin parameter should be parsed with query string library #3902

Open
ktamaral opened this issue Apr 23, 2024 · 0 comments
Open

Origin parameter should be parsed with query string library #3902

ktamaral opened this issue Apr 23, 2024 · 0 comments

Comments

@ktamaral
Copy link

The origin parameter is being appended to the end of the login url with direct string manipulation, e.g. ${url}?origin=${window.origin}

This is problematic in some use cases where pre-existing parameters may need to be passed through to the login service. In the case where pre-existing parameters exist in the origin url, this results in a url with two “?” delimiters, one for the pre-existing parameters and another for the origin at the end. Therefore, any pre-existing existing parameters will not be readable by the login service. In our use case at Harvard Library, we do have some pre-existing parameters that are required for the login process. We're currently working around the issue by processing the url to remove the redundant "?" delimiter before it is parsed by the login service.

Ideally, this would be done in Mirador by appending the origin parameter using a string parsing library (such as the builtin UrlSearchParams library). This will allow any pre-existing parameters to be properly parsed and added in to the url when it's reconstructed by the Mirador code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant