René's URL Explorer Experiment


Title: fix(backend): harden machine-token verification and redact debug-logged tokens by jacekradko · Pull Request #8744 · clerk/javascript · GitHub

Open Graph Title: fix(backend): harden machine-token verification and redact debug-logged tokens by jacekradko · Pull Request #8744 · clerk/javascript

X Title: fix(backend): harden machine-token verification and redact debug-logged tokens by jacekradko · Pull Request #8744 · clerk/javascript

Description: Official JavaScript repository for Clerk authentication - fix(backend): harden machine-token verification and redact debug-logged tokens by jacekradko · Pull Request #8744 · clerk/javascript

Open Graph Description: Two backend hardening fixes that came out of a security scan of the token-verification paths. verifyMachineAuthToken could throw on a crafted token: an at+jwt JWT with a missing or non-string sub r...

X Description: Two backend hardening fixes that came out of a security scan of the token-verification paths. verifyMachineAuthToken could throw on a crafted token: an at+jwt JWT with a missing or non-string sub r...

Opengraph URL: https://github.com/clerk/javascript/pull/8744

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:45055622-df48-cd94-b77d-814bed7d65be
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD2C6:1E2982:B0C1F1:FF201C:6AFAC13F
html-safe-nonce7093065e28f18b9e03add20134f484801b105d2b334cd2b93bd9035e7495f8a5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMkM2OjFFMjk4MjpCMEMxRjE6RkYyMDFDOjZBRkFDMTNGIiwidmlzaXRvcl9pZCI6IjU4NTM0OTY3OTUwNTIyOTQ0NjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac8b59198c966bf712c01a311b7e8e45db8290c8cd7886a5521dd3e678f48698df
hovercard-subject-tagpull_request:3798854799
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/clerk/javascript/8744/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/c4f8ee5b6d49a7d1e476ca32bc43f8241e5441b4231e91346077a6563d800947/clerk/javascript/pull/8744
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c4f8ee5b6d49a7d1e476ca32bc43f8241e5441b4231e91346077a6563d800947/clerk/javascript/pull/8744
og:image:altTwo backend hardening fixes that came out of a security scan of the token-verification paths. verifyMachineAuthToken could throw on a crafted token: an at+jwt JWT with a missing or non-string sub r...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejacekradko
hostnamegithub.com
expected-hostnamegithub.com
None612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7
turbo-cache-controlno-cache
go-importgithub.com/clerk/javascript git https://github.com/clerk/javascript.git
octolytics-dimension-user_id49538330
octolytics-dimension-user_loginclerk
octolytics-dimension-repository_id438331492
octolytics-dimension-repository_nwoclerk/javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id438331492
octolytics-dimension-repository_network_root_nwoclerk/javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release072e34035c13c31543fba9f025cbbbda4210dae4
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/clerk/javascript/pull/8744#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fclerk%2Fjavascript%2Fpull%2F8744
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fclerk%2Fjavascript%2Fpull%2F8744
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=clerk%2Fjavascript
Reloadhttps://github.com/clerk/javascript/pull/8744
Reloadhttps://github.com/clerk/javascript/pull/8744
Reloadhttps://github.com/clerk/javascript/pull/8744
clerkhttps://github.com/clerk
javascripthttps://github.com/clerk/javascript
Codehttps://github.com/clerk/javascript
Issues44 (44)https://github.com/clerk/javascript/issues
Pull requests112 (112)https://github.com/clerk/javascript/pulls
Discussionshttps://github.com/clerk/javascript/discussions
Actionshttps://github.com/clerk/javascript/actions
Security and quality6 (6)https://github.com/clerk/javascript/security
Insightshttps://github.com/clerk/javascript/pulse
https://github.com/clerk/javascript
jacekradkohttps://github.com/jacekradko
mainhttps://github.com/clerk/javascript/tree/main
jacek/backend-token-hardeninghttps://github.com/clerk/javascript/tree/jacek/backend-token-hardening
Conversationhttps://github.com/clerk/javascript/pull/8744
Commits6 (6)https://github.com/clerk/javascript/pull/8744/commits
Checkshttps://github.com/clerk/javascript/pull/8744/checks
Files changedhttps://github.com/clerk/javascript/pull/8744/files
fix(backend): harden machine-token verification and redact debug-logged tokenshttps://github.com/clerk/javascript/pull/8744#top
jacekradkohttps://github.com/jacekradko
mainhttps://github.com/clerk/javascript/tree/main
jacek/backend-token-hardeninghttps://github.com/clerk/javascript/tree/jacek/backend-token-hardening
https://github.com/jacekradko
jacekradkohttps://github.com/jacekradko
Jun 3, 2026https://github.com/clerk/javascript/pull/8744#issue-4583912943
Please reload this pagehttps://github.com/clerk/javascript/pull/8744
Please reload this pagehttps://github.com/clerk/javascript/pull/8744
https://github.com/apps/changeset-bot
changeset-bothttps://github.com/apps/changeset-bot
Jun 3, 2026https://github.com/clerk/javascript/pull/8744#issuecomment-4617013644
Please reload this pagehttps://github.com/clerk/javascript/pull/8744
acf2352https://github.com/clerk/javascript/commit/acf2352b30af3c27dcfc2b6af20ce96eb31101f5
Click here to learn what changesets arehttps://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md
Click here if you're a maintainer who wants to add another changeset to this PRhttps://github.com/clerk/javascript/new/jacek/backend-token-hardening?filename=.changeset/slow-trees-wait.md&value=---%0A%22%40clerk%2Fbackend%22%3A%20patch%0A%22%40clerk%2Fnextjs%22%3A%20patch%0A---%0A%0Afix(backend)%3A%20harden%20machine-token%20verification%20and%20redact%20debug-logged%20tokens%0A
Please reload this pagehttps://github.com/clerk/javascript/pull/8744
https://github.com/apps/vercel
vercelhttps://github.com/apps/vercel
Jun 3, 2026https://github.com/clerk/javascript/pull/8744#issuecomment-4617013690
Please reload this pagehttps://github.com/clerk/javascript/pull/8744
Vercel for GitHubhttps://vercel.link/github-learn-more
clerk-js-sandboxhttps://vercel.com/clerk-production/clerk-js-sandbox
https://camo.githubusercontent.com/833ba95642364322d56bfc6cc95692affdd7a5a6ca7b50fdcc44aa7e47372d3b/68747470733a2f2f76657263656c2e636f6d2f7374617469632f7374617475732f72656164792e737667
Readyhttps://vercel.com/clerk-production/clerk-js-sandbox/9oGwMUDxrhHTjGrubv66xbA3sXdM
Previewhttps://clerk-js-sandbox-git-jacek-backend-token-hardening.clerkstage.dev
Commenthttps://vercel.live/open-feedback/clerk-js-sandbox-git-jacek-backend-token-hardening.clerkstage.dev?via=pr-comment-feedback-link
https://vercel.com/vercel-agent/request-review?owner=clerk&repo=javascript&pr=8744
Please reload this pagehttps://github.com/clerk/javascript/pull/8744
https://github.com/apps/vercel
vercelhttps://github.com/apps/vercel
deployedhttps://clerk-js-sandbox-n1hff56ga.clerkstage.dev
Previewhttps://clerk-js-sandbox-n1hff56ga.clerkstage.dev
June 3, 2026 21:50https://github.com/clerk/javascript/pull/8744#event-26309557644
View deploymenthttps://clerk-js-sandbox-n1hff56ga.clerkstage.dev
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
backend https://github.com/clerk/javascript/issues?q=state%3Aopen%20label%3Abackend
Jun 3, 2026https://github.com/clerk/javascript/pull/8744#event-26309559857
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Jun 3, 2026https://github.com/clerk/javascript/pull/8744#issuecomment-4617039988
Please reload this pagehttps://github.com/clerk/javascript/pull/8744
Please reload this pagehttps://github.com/clerk/javascript/pull/8744
https://github.com/apps/coderabbitai
coderabbitaihttps://github.com/apps/coderabbitai
Jun 3, 2026https://github.com/clerk/javascript/pull/8744#issuecomment-4617040603
Please reload this pagehttps://github.com/clerk/javascript/pull/8744
https://app.coderabbit.ai/change-stack/clerk/javascript/pull/8744?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack
201020dhttps://github.com/clerk/javascript/commit/201020d0d6dd7d18239a8cedcb4ac482050e6700
acf2352https://github.com/clerk/javascript/commit/acf2352b30af3c27dcfc2b6af20ce96eb31101f5
Please reload this pagehttps://github.com/clerk/javascript/pull/8744
https://github.com/apps/coderabbitai
coderabbitaihttps://github.com/apps/coderabbitai
Jun 3, 2026 https://github.com/clerk/javascript/pull/8744#pullrequestreview-4423101913
View reviewed changes https://github.com/clerk/javascript/pull/8744/files
coderabbitaihttps://github.com/apps/coderabbitai
https://github.com/clerk/javascript/pull/8744#pullrequestreview-4423101913
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
8e1bd48https://github.com/clerk/javascript/commit/8e1bd48a91dc07751493f41416d2a68b89e114cc
4637795https://github.com/clerk/javascript/commit/4637795237ac1534e64de5da2e5e321a44afe43b
Please reload this pagehttps://github.com/clerk/javascript/pull/8744
packages/backend/src/tokens/authObjects.tshttps://github.com/clerk/javascript/pull/8744/files#diff-9c289501d652301f95e515724629079368771b9e635e5aed71e3010853009a5b
Please reload this pagehttps://github.com/clerk/javascript/pull/8744
June 3, 2026 17:19https://github.com/clerk/javascript/pull/8744#commits-pushed-dd87f26
fix(backend): guard machine-token sub before startsWith to prevent crashhttps://github.com/clerk/javascript/pull/8744/commits/dd87f261deff45c83c5d0447c3377656f4bfeb71
dd87f26https://github.com/clerk/javascript/pull/8744/commits/dd87f261deff45c83c5d0447c3377656f4bfeb71
fix(backend): redact raw tokens from auth debug outputhttps://github.com/clerk/javascript/pull/8744/commits/f9d1a123c492b585429b9b61da648598af013285
f9d1a12https://github.com/clerk/javascript/pull/8744/commits/f9d1a123c492b585429b9b61da648598af013285
https://github.com/jacekradko
jacekradkohttps://github.com/jacekradko
force-pushedhttps://github.com/clerk/javascript/compare/4637795237ac1534e64de5da2e5e321a44afe43b..f9d1a123c492b585429b9b61da648598af013285
4637795https://github.com/clerk/javascript/commit/4637795237ac1534e64de5da2e5e321a44afe43b
f9d1a12https://github.com/clerk/javascript/commit/f9d1a123c492b585429b9b61da648598af013285
Compare https://github.com/clerk/javascript/compare/4637795237ac1534e64de5da2e5e321a44afe43b..f9d1a123c492b585429b9b61da648598af013285
June 3, 2026 22:19https://github.com/clerk/javascript/pull/8744#event-26310549010
Merge branch 'main' into jacek/backend-token-hardeninghttps://github.com/clerk/javascript/pull/8744/commits/4cc198938bee84c0fa92b3203f8f35453b8771a7
4cc1989https://github.com/clerk/javascript/pull/8744/commits/4cc198938bee84c0fa92b3203f8f35453b8771a7
https://github.com/apps/vercel
vercelhttps://github.com/apps/vercel
deployedhttps://clerk-js-sandbox-jv61ehcii.clerkstage.dev
Previewhttps://clerk-js-sandbox-jv61ehcii.clerkstage.dev
June 3, 2026 22:20https://github.com/clerk/javascript/pull/8744#event-26310581001
View deploymenthttps://clerk-js-sandbox-jv61ehcii.clerkstage.dev
https://github.com/apps/pkg-pr-new
pkg-pr-newhttps://github.com/apps/pkg-pr-new
Jun 3, 2026https://github.com/clerk/javascript/pull/8744#issuecomment-4617206947
Please reload this pagehttps://github.com/clerk/javascript/pull/8744
Open in StackBlitzhttps://pkg.pr.new/template/3114dc35-8c05-4e2b-b766-3184fe7c76d8
acf2352https://github.com/clerk/javascript/runs/79435796420
Please reload this pagehttps://github.com/clerk/javascript/pull/8744
fix(nextjs): recursively redact token keys in middleware debug log ou…https://github.com/clerk/javascript/pull/8744/commits/201020d0d6dd7d18239a8cedcb4ac482050e6700
201020dhttps://github.com/clerk/javascript/pull/8744/commits/201020d0d6dd7d18239a8cedcb4ac482050e6700
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
nextjs https://github.com/clerk/javascript/issues?q=state%3Aopen%20label%3Anextjs
Jun 4, 2026https://github.com/clerk/javascript/pull/8744#event-26316209720
https://github.com/apps/vercel
vercelhttps://github.com/apps/vercel
deployedhttps://clerk-js-sandbox-bsg09f38t.clerkstage.dev
Previewhttps://clerk-js-sandbox-bsg09f38t.clerkstage.dev
June 4, 2026 01:54https://github.com/clerk/javascript/pull/8744#event-26316228197
View deploymenthttps://clerk-js-sandbox-bsg09f38t.clerkstage.dev
https://github.com/apps/coderabbitai
coderabbitaihttps://github.com/apps/coderabbitai
Jun 4, 2026 https://github.com/clerk/javascript/pull/8744#pullrequestreview-4424074233
View reviewed changes https://github.com/clerk/javascript/pull/8744/files/201020d0d6dd7d18239a8cedcb4ac482050e6700
coderabbitaihttps://github.com/apps/coderabbitai
https://github.com/clerk/javascript/pull/8744#pullrequestreview-4424074233
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
4cc1989https://github.com/clerk/javascript/commit/4cc198938bee84c0fa92b3203f8f35453b8771a7
201020dhttps://github.com/clerk/javascript/commit/201020d0d6dd7d18239a8cedcb4ac482050e6700
Please reload this pagehttps://github.com/clerk/javascript/pull/8744
Merge branch 'main' into jacek/backend-token-hardeninghttps://github.com/clerk/javascript/pull/8744/commits/4489cc6764a91f2198bec2378489ce728ea809f7
4489cc6https://github.com/clerk/javascript/pull/8744/commits/4489cc6764a91f2198bec2378489ce728ea809f7
https://github.com/apps/vercel
vercelhttps://github.com/apps/vercel
deployedhttps://clerk-js-sandbox-npmj78zz5.clerkstage.dev
Previewhttps://clerk-js-sandbox-npmj78zz5.clerkstage.dev
June 4, 2026 02:06https://github.com/clerk/javascript/pull/8744#event-26316519020
View deploymenthttps://clerk-js-sandbox-npmj78zz5.clerkstage.dev
fix(backend): redact refresh, dev-browser and handshake tokens in deb…https://github.com/clerk/javascript/pull/8744/commits/acf2352b30af3c27dcfc2b6af20ce96eb31101f5
acf2352https://github.com/clerk/javascript/pull/8744/commits/acf2352b30af3c27dcfc2b6af20ce96eb31101f5
https://github.com/apps/vercel
vercelhttps://github.com/apps/vercel
deployedhttps://clerk-js-sandbox-l0ufryulq.clerkstage.dev
Previewhttps://clerk-js-sandbox-l0ufryulq.clerkstage.dev
June 4, 2026 02:12https://github.com/clerk/javascript/pull/8744#event-26316665608
View deploymenthttps://clerk-js-sandbox-l0ufryulq.clerkstage.dev
https://github.com/wobsoriano
wobsorianohttps://github.com/wobsoriano
Jun 4, 2026 https://github.com/clerk/javascript/pull/8744#pullrequestreview-4424253708
View reviewed changes https://github.com/clerk/javascript/pull/8744/files/acf2352b30af3c27dcfc2b6af20ce96eb31101f5
wobsorianohttps://github.com/wobsoriano
https://github.com/clerk/javascript/pull/8744#pullrequestreview-4424253708
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/clerk/javascript/pull/8744
https://github.com/jacekradko
jacekradkohttps://github.com/jacekradko
27c4d75https://github.com/clerk/javascript/commit/27c4d750e067d54bc60e6c21d6f416e326cd77fc
Jun 4, 2026https://github.com/clerk/javascript/pull/8744#event-26318408132
Please reload this pagehttps://github.com/clerk/javascript/pull/8744
https://github.com/jacekradko
jacekradkohttps://github.com/jacekradko
June 4, 2026 03:25https://github.com/clerk/javascript/pull/8744#event-26318408740
https://github.com/clerk-cookie
clerk-cookiehttps://github.com/clerk-cookie
Jun 4, 2026 https://github.com/clerk/javascript/pull/8744#ref-pullrequest-4581586425
ci(repo): Version packages #8735 https://github.com/clerk/javascript/pull/8735
Deployedhttps://clerk-js-sandbox-l0ufryulq.clerkstage.dev
vercel[bot]https://github.com/apps/vercel
View deployment https://clerk-js-sandbox-l0ufryulq.clerkstage.dev
https://github.co/hiddenchars
https://github.com/clerk/javascript/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fclerk%2Fjavascript%2Fpull%2F8744
https://github.com/apps/coderabbitai
coderabbitai[bot] https://github.com/apps/coderabbitai
https://github.com/clerk/javascript/pull/8744/files/acf2352b30af3c27dcfc2b6af20ce96eb31101f5
https://github.com/wobsoriano
wobsoriano https://github.com/wobsoriano
https://github.com/clerk/javascript/pull/8744/files/acf2352b30af3c27dcfc2b6af20ce96eb31101f5
Please reload this pagehttps://github.com/clerk/javascript/pull/8744
backend https://github.com/clerk/javascript/issues?q=state%3Aopen%20label%3Abackend
nextjs https://github.com/clerk/javascript/issues?q=state%3Aopen%20label%3Anextjs
Please reload this pagehttps://github.com/clerk/javascript/pull/8744
https://github.com/jacekradko
https://github.com/wobsoriano
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.