Skip to content

fix(auth): use placeholder jwt issuer when builder url unset at build - #1607

Merged
realcodesiman merged 1 commit into
mainfrom
fix/auth-jwt-issuer-at-build
Oct 31, 2026
Merged

realcodesiman merged 1 commit into
mainfrom
fix/auth-jwt-issuer-at-build

Conversation

@realcodesiman

Copy link
Copy Markdown
Contributor

Summary

  • NEXT_PUBLIC_BUILDER_URL is absent during next build with SKIP_ENV_CHECK=true, so new URL(env.NEXT_PUBLIC_BUILDER_URL) threw while collecting page config (e.g. /channels/instagram-facebook).
  • Reuse the loopback build placeholder for the JWT issuer origin.

Changes

  • packages/auth/src/keys.ts: add isUnsetBuildUrl and getBuilderOrigin; getMcpResourceUrl uses the shared helper.
  • packages/auth/src/server.ts: jwt() issuer now uses getBuilderOrigin().

Test plan

  • pnpm lint
  • pnpm --filter @chatbotx.io/auth check-types
  • next build without NEXT_PUBLIC_BUILDER_URL succeeds

🤖 Generated with Claude Code

NEXT_PUBLIC_BUILDER_URL is absent during `next build` with SKIP_ENV_CHECK, so
`new URL(env.NEXT_PUBLIC_BUILDER_URL)` threw while collecting page config.
Reuse the loopback build placeholder for the issuer origin.
@github-actions github-actions Bot added the bug Something isn't working as expected label Oct 31, 2026
@realcodesiman
realcodesiman merged commit 901017f into main Oct 31, 2026
35 checks passed
@realcodesiman
realcodesiman deleted the fix/auth-jwt-issuer-at-build branch October 31, 2026 11:12
hello-jackytruong referenced this pull request in hello-jackytruong/ChatWorkAI Nov 22, 2026
… (#1607)

NEXT_PUBLIC_BUILDER_URL is absent during `next build` with SKIP_ENV_CHECK, so
`new URL(env.NEXT_PUBLIC_BUILDER_URL)` threw while collecting page config.
Reuse the loopback build placeholder for the issuer origin.

This branch was previously deployed

1 inactive deployment
dev — 5791128e Deployed Oct 31, 2026 by realcodesiman via output-image-urls #3003
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant