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

Music-festival-react parses contentId and workId from previewToken, but the documentation states that this should not be done #44

Open
phlipsterit opened this issue Sep 24, 2024 · 0 comments

Comments

@phlipsterit
Copy link

In the function extractParams at https://github.com/episerver/content-graph-js-sdk/blob/main/samples/musicfestival-frontend-react/src/helpers/urlHelper.ts#L20, contentId and workId is read from the payload of of the previewToken :
const contentId = payload.c_id && parseInt(payload.c_id!.toString());

But the documentation at https://docs.developers.optimizely.com/platform-optimizely/v1.4.0-optimizely-graph/docs/on-page-editing-using-content-graph#setup-decoupled-site states that we should not depend on the content of the token :

"Note

The preview token is only meant to be used to query data from Optimizely Graph. Do not depend on the contents of the token itself as they are subject to change in the future.
"

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