Skip to content

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

Open
@phlipsterit

Description

@phlipsterit

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.
"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions