Skip to content

Conversation

@brunopagno
Copy link
Contributor

@brunopagno brunopagno commented Jan 16, 2026

Counterpart of opf/openproject#21706

What are you trying to accomplish?

Package parameters from rails counterpart so that we can properly validate them in Hocuspocus

What approach did you choose and why?

The parameters are packaged into a JWT using symmetric signatures to allow validation.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@brunopagno brunopagno requested a review from a team January 16, 2026 14:48
@brunopagno brunopagno self-assigned this Jan 16, 2026
Copy link

@judithroth judithroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far this looks good to me! I also tried it locally and it works.

readonly,
} = verifyToken(token);

console.log({ token, resourceUrl, tokenResourceUrl, authToken, readonly });

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're probably aware that this is still here and remove it before merge 🙂

@brunopagno brunopagno requested a review from judithroth January 19, 2026 11:58
Copy link

@judithroth judithroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As said when we discussed, I would have preferred an different approach. But as this seems not to be easily doable with Hocuspocus, I'm ok with the current approach.
I tested both PRs locally and it works 👍
Good work!

});

test("when the token is invalid throw an error", async () => {
test("when the packedParams is expired", async () => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding tests!

@brunopagno
Copy link
Contributor Author

Close in favour of #33

@brunopagno brunopagno closed this Jan 19, 2026
@brunopagno brunopagno deleted the impl/70603-handle-packed-params branch January 21, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants