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

Token is removed when URL rewriter is applied #19

Open
leroyvandijk opened this issue Jun 14, 2023 · 4 comments
Open

Token is removed when URL rewriter is applied #19

leroyvandijk opened this issue Jun 14, 2023 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@leroyvandijk
Copy link

leroyvandijk commented Jun 14, 2023

Hi Bloomreach team,

We use the URL rewriter to rewrite articles for our website from example /articles/2023/06/other-test to /articles/other-test.

Now when in the experience manager, I want to go to the live preview it first shows me the page:
http://localhost:3000/articles/2023/06/other-test?token=THEWHOLEJWTTOKEN&endpoint=http://localhost:8080/site/resourceapi which gives a 301 and redirects me to this page: http://localhost:3000/articles/other-test?endpoint=http%3A%2F%2Flocalhost%3A8080%2Fsite%2Fresourceapi

image

As you can see the token is stripped away, which causes the user not to see the edit buttons on the preview page.
Since there is an issue with the experience manager not giving the correct url, the user can edit the pages only through Content -> Documents -> Articles -> Test Article and then the View -> Website button. We currently do not have a solution to fix this, so we thought maybe the frontend app can be adjusted so it actually can pass the token.

I've tested the issue with changing the 'authorizationQueryParameter' in the configuration to something like 'blabla'. Then the token is NOT stripped away anymore, but of course the preview doesn't work anymore.

Is there a way so we can pass the token after the redirect?

Kind regards,
Leroy

@beetlerom beetlerom added the documentation Improvements or additions to documentation label Jun 19, 2023
@joerideg
Copy link
Contributor

Hi @leroyvandijk ,
Could you please share with us some additional info on your setup.

  • What version of Content are you using, SaaS or PaaS, and if PaaS what version?
  • What version of the SDK are you using?
  • The 'Url rewriter' you mention is that a bloomreach supported plugin?
  • Is that just for the CKEditor or also for other links?

I'll ask within the team if anyone has some idea's on how to solve your problem or at least provide a workaround.

@beetlerom
Copy link

beetlerom commented Jun 22, 2023

@leroyvandijk Any updates on this, we need the info to be able to look into your issue?

@leroyvandijk
Copy link
Author

What version of Content are you using, SaaS or PaaS, and if PaaS what version? PaaS, 15.2.3
What version of the SDK are you using? 21.0.0
The 'Url rewriter' you mention is that a bloomreach supported plugin? Yes
Is that just for the CKEditor or also for other links? The token is only used for the experience manager, but yes all the links that come with the url rewriter.

I've created a workaround that picks up the token from the Authorization header en put that as a query param in the redirect

@joerideg
Copy link
Contributor

Ok thanks @leroyvandijk , I'll discuss it with someone internal that has the knowledge on how the url rewriting works in the backend for the experience manager preview and get back to you.

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

No branches or pull requests

3 participants