Title: idp: issuer required before listen — rules out port-0 ephemeral-port composition tests · Issue #609 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: idp: issuer required before listen — rules out port-0 ephemeral-port composition tests · Issue #609 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: idp: issuer required before listen — rules out port-0 ephemeral-port composition tests · Issue #609 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Observed With the IdP enabled, createServer throws at plugin-registration time when no issuer is known: Error: IdP requires issuer URL at idpPlugin (src/idp/index.js:57) That's correct as a guard, but it forecloses the standard ephemeral...
Open Graph Description: Observed With the IdP enabled, createServer throws at plugin-registration time when no issuer is known: Error: IdP requires issuer URL at idpPlugin (src/idp/index.js:57) That's correct as a guard, ...
X Description: Observed With the IdP enabled, createServer throws at plugin-registration time when no issuer is known: Error: IdP requires issuer URL at idpPlugin (src/idp/index.js:57) That's correct as a gua...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/609
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"idp: issuer required before listen — rules out port-0 ephemeral-port composition tests","articleBody":"## Observed\n\nWith the IdP enabled, `createServer` throws at plugin-registration time when no issuer is known:\n\n```\nError: IdP requires issuer URL\n at idpPlugin (src/idp/index.js:57)\n```\n\nThat's correct as a guard, but it forecloses the standard ephemeral-port test pattern:\n\n```js\nconst fastify = createServer({ root, idp: true, plugins: [...] }); // throws here…\nawait fastify.listen({ port: 0 }); // …so we never learn the port\nconst base = `http://127.0.0.1:${fastify.server.address().port}`; // which the issuer needs\n```\n\nChicken-and-egg: the issuer needs the port, the port is only known after `listen`, and the IdP demands the issuer before it.\n\n## Impact\n\nEvery plugin author writing integration tests against a *composed* instance (IdP + their plugin, exercising the `POST /idp/credentials` login bridge end-to-end) has to pin a fixed port instead. Fixed ports collide on busy dev machines and CI — this box already has 3210 (Tideholm), 3220 (Bridge) and 3230 (OMERTÀ) spoken for, and the OMERTÀ test suite had to reserve 3239 with a `TEST_PORT` escape hatch.\n\n## Suggested fix\n\nDefer issuer resolution to first use rather than registration time — e.g. accept `idpIssuer: () => string` or, when `idpIssuer` is absent and the server is bound to localhost, resolve it lazily from `server.address()` after listen. The guard can stay for the production path (non-loopback binds without an explicit issuer should still throw).\n\nPrecedent: #601 solved the same \"origin isn't knowable at activate time\" problem for plugins with `api.serverInfo` — this is the IdP-side sibling of that issue.\n\nFound while building the OMERTÀ plugin (third consumer of the #206 seams); findings log in `solid-apps/mafia` `jss-plugin/NOTES.md`.","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-07-11T10:14:21Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/609"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a28d5c10-6e23-e9b9-d2c0-9f073a88a72b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C4B0:34EF89:A52E55:DBAAC7:6B03A672 |
| html-safe-nonce | 48ac5d17b76ae3f267fee48cb61b48039a1e704e845898fc7a3f920755423727 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNEIwOjM0RUY4OTpBNTJFNTU6REJBQUM3OjZCMDNBNjcyIiwidmlzaXRvcl9pZCI6IjE1NDY2MzUwNjgxNjI5NDI1NzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3d254df0799730070459f67c30dccfef76bc9be002b0a1be4937ede8649a5218 |
| hovercard-subject-tag | issue:4861784434 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/609/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dd74ee8ec00546535b582e3040268c33938ecab7559ba2bb38ac02c0e861c4a4/JavaScriptSolidServer/JavaScriptSolidServer/issues/609 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dd74ee8ec00546535b582e3040268c33938ecab7559ba2bb38ac02c0e861c4a4/JavaScriptSolidServer/JavaScriptSolidServer/issues/609 |
| og:image:alt | Observed With the IdP enabled, createServer throws at plugin-registration time when no issuer is known: Error: IdP requires issuer URL at idpPlugin (src/idp/index.js:57) That's correct as a guard, ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width