René's URL Explorer Experiment


Title: @clerk/backend: decodeJwt throws a raw SyntaxError for a malformed token · Issue #9263 · clerk/javascript · GitHub

Open Graph Title: @clerk/backend: decodeJwt throws a raw SyntaxError for a malformed token · Issue #9263 · clerk/javascript

X Title: @clerk/backend: decodeJwt throws a raw SyntaxError for a malformed token · Issue #9263 · clerk/javascript

Description: Preliminary Checks I have reviewed the documentation: https://clerk.com/docs I have searched for existing issues: https://github.com/clerk/javascript/issues I have not already reached out to Clerk support via email or Discord (if you hav...

Open Graph Description: Preliminary Checks I have reviewed the documentation: https://clerk.com/docs I have searched for existing issues: https://github.com/clerk/javascript/issues I have not already reached out to Clerk ...

X Description: Preliminary Checks I have reviewed the documentation: https://clerk.com/docs I have searched for existing issues: https://github.com/clerk/javascript/issues I have not already reached out to Clerk ...

Opengraph URL: https://github.com/clerk/javascript/issues/9263

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"@clerk/backend: decodeJwt throws a raw SyntaxError for a malformed token","articleBody":"### Preliminary Checks\n\n- [x] I have reviewed the documentation: https://clerk.com/docs\n\n- [x] I have searched for existing issues: https://github.com/clerk/javascript/issues\n\n- [x] I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)\n\n- [x] This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.\n\n\n### Reproduction\n\n-\n\n### Publishable key\n\n-\n\n### Description\n\n`decodeJwt` throws a plain `SyntaxError` if a token has three segments but they're not valid base64url. It should throw a `TokenVerificationError` like it does for other bad tokens.\n```\ncurl -i -H 'Authorization: Bearer aaa.bbb.ccc' https://example.com/\n```\n\n**Steps to reproduce:**\n\n```typescript\nconst { decodeJwt } = require('@clerk/backend/jwt')\n\ndecodeJwt('aaa.bbb.ccc')\n```\n\n**Expected behavior**:\n\n`TokenVerificationError`, which is what you get from `decodeJwt('aaaa.bbbb')` or `decodeJwt('notajwt')`.\n\n**Actual behavior**:\n\nThrows `SyntaxError: Unexpected end of data`.\n\ndecodeJwt checks that there are three parts, but the `base64url.parse` and `JSON.parse` calls right after that check aren't wrapped in anything. `decodeJwt('YWJj.YWJj.YWJj')` hits the `JSON.parse` one and throws `SyntaxError: Unexpected token 'a', \"abc\" is not valid JSON.`\n\n### Environment\n\n```Shell\n- @clerk/backend 3.13.2\n```","author":{"url":"https://github.com/ollipa","@type":"Person","name":"ollipa"},"datePublished":"2026-07-28T06:27:45Z","url":"https://github.com/clerk/javascript/issues/9263"}

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/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:2dbc761e-7e2e-a5f8-f0a0-eec07fa486ad
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC594:210607:CFED2:12453A:6AFB6769
html-safe-noncee8d2d234b57041cb134ad9bb4edc993e51a3ca7d59b766d570a256865adde63a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTk0OjIxMDYwNzpDRkVEMjoxMjQ1M0E6NkFGQjY3NjkiLCJ2aXNpdG9yX2lkIjoiNjQ3NDE3ODQxMDM3NjI5MjIwMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaca2a34cfdd763a5c61cc30c41b1b6d9bc323a24942f20bb1b5e6b236103bad4b6
hovercard-subject-tagissue:4995625656
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/clerk/javascript/9263/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b643e5527e59d73a238d76e94be3acfbb82824326c1f31e8345e07f87d9c01f2/clerk/javascript/issues/9263
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b643e5527e59d73a238d76e94be3acfbb82824326c1f31e8345e07f87d9c01f2/clerk/javascript/issues/9263
og:image:altPreliminary Checks I have reviewed the documentation: https://clerk.com/docs I have searched for existing issues: https://github.com/clerk/javascript/issues I have not already reached out to Clerk ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameollipa
hostnamegithub.com
expected-hostnamegithub.com
Noneea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94
turbo-cache-controlno-preview
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
release59ef97164c52cf59bd10558ddec9c4f482763988
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/clerk/javascript/issues/9263#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fclerk%2Fjavascript%2Fissues%2F9263
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%2Fissues%2F9263
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%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=clerk%2Fjavascript
Reloadhttps://github.com/clerk/javascript/issues/9263
Reloadhttps://github.com/clerk/javascript/issues/9263
Reloadhttps://github.com/clerk/javascript/issues/9263
clerkhttps://github.com/clerk
javascripthttps://github.com/clerk/javascript
Codehttps://github.com/clerk/javascript
Issues45 (45)https://github.com/clerk/javascript/issues
Pull requests110 (110)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
New issuehttps://github.com/login?return_to=https://github.com/clerk/javascript/issues/9263
New issuehttps://github.com/login?return_to=https://github.com/clerk/javascript/issues/9263
#9268https://github.com/clerk/javascript/pull/9268
@clerk/backend: decodeJwt throws a raw SyntaxError for a malformed tokenhttps://github.com/clerk/javascript/issues/9263#top
#9268https://github.com/clerk/javascript/pull/9268
needs-triageA ticket that needs to be triaged by a team memberhttps://github.com/clerk/javascript/issues?q=state%3Aopen%20label%3A%22needs-triage%22
https://github.com/ollipa
ollipahttps://github.com/ollipa
on Jul 28, 2026https://github.com/clerk/javascript/issues/9263#issue-4995625656
https://clerk.com/docshttps://clerk.com/docs
https://github.com/clerk/javascript/issueshttps://github.com/clerk/javascript/issues
https://clerk.com/discordhttps://clerk.com/discord
ollipahttps://github.com/ollipa
needs-triageA ticket that needs to be triaged by a team memberhttps://github.com/clerk/javascript/issues?q=state%3Aopen%20label%3A%22needs-triage%22
on Jul 28, 2026https://github.com/clerk/javascript/issues/9263#event-28580885006
https://github.com/wobsoriano
wobsorianohttps://github.com/wobsoriano
on Jul 29, 2026https://github.com/clerk/javascript/issues/9263#issuecomment-5112886992
wobsorianohttps://github.com/wobsoriano
completedhttps://github.com/clerk/javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#9268https://github.com/clerk/javascript/pull/9268
on Jul 30, 2026https://github.com/clerk/javascript/issues/9263#event-28730000761
Sign up for freehttps://github.com/signup?return_to=https://github.com/clerk/javascript/issues/9263
Sign in to commenthttps://github.com/login?return_to=https://github.com/clerk/javascript/issues/9263
needs-triageA ticket that needs to be triaged by a team memberhttps://github.com/clerk/javascript/issues?q=state%3Aopen%20label%3A%22needs-triage%22
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.