Skip to content

Adapt site resolution/lookup to pass visitor unsigned claims in addition to token #3202

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

Conversation

spastorelli
Copy link
Contributor

@spastorelli spastorelli commented Apr 30, 2025

This PR aims to add site resolution/lookup to pass visitor unsigned claims in addition to token when calling getPublishedContentByUrl. The unsigned claims can originate either from a gitbook-visitor-public-* cookie or visitor.* query parameters passed to the site url.

Pending https://github.com/GitbookIO/gitbook-x/pull/17625 to be merged.

TODO:

  • add method to extracts unsigned claims from public cookie or url param and another one that return an object with both token and unassigned to be passed to getPublishedContentByUrl call
  • add method to site resolution lookup module that pass the retrieved visitor payload (token + unsigned claims) and call new resolvePublishedContentByUrl endpoint.
  • update site resolution in v2 code to use the new resolvePublishedContentByUrl (only for select sites for initially to allow us test)

Copy link

changeset-bot bot commented Apr 30, 2025

⚠️ No Changeset found

Latest commit: 7ddb0b7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

argos-ci bot commented Apr 30, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
customers-v1 (Inspect) ✅ No changes detected - May 9, 2025, 8:31 AM
customers-v2 (Inspect) 👍 Changes approved 83 changed May 9, 2025, 8:33 AM
default (Inspect) ✅ No changes detected - May 9, 2025, 8:55 AM
v2-vercel (Inspect) ✅ No changes detected - May 9, 2025, 8:35 AM

@spastorelli spastorelli changed the title Adapt site resolution/lookup to pass visitor unsigned claims in addition to token when calling getPublishedContentByUrl Adapt site resolution/lookup to pass visitor unsigned claims in addition to token Apr 30, 2025
@taranvohra taranvohra merged commit 56c923c into main May 9, 2025
20 checks passed
@taranvohra taranvohra deleted the steeve/rnd-7007-adapt-gbo-to-support-public-claims-stored-in-cookies-as branch May 9, 2025 10:04
clairechabas added a commit that referenced this pull request May 9, 2025
…n-gbo

* main:
  Use next@15.3.2 instead of canary (#3227)
  Remove header logo rounding (#3225)
  Always link main logo to the root of the site (#3226)
  Adapt site resolution/lookup to pass visitor unsigned claims in addition to token (#3202)
  Passthrough SVG images in image resizing (#3224)
  Handle invalid OpenAPI Responses (#3223)
  Fix E2E icons (#3222)
  Fix sitemap URLs (#3220)
  Prevent section group popovers from opening on click (#3213)
  Update site redirect regex for validation (#3216)
  Fix code highlighting for HTTP (#3214)
  Fix Python code sample "null vs None" (#3215)
  Fix resolution of links in reusable content (#3212)
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

Successfully merging this pull request may close these issues.

3 participants