You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
createHonoApp's default prefix: '/api' does not compose with AuthPlugin's default basePath: '/api/v1/auth' — the documented embed answers 200 {} to sign-in #16025
Found while measuring #15928; out of that card's scope (that card is about which 404 the /auth/* mount may yield, this is about the mount never reaching better-auth at all). Filed unassigned.
Boot: a real ObjectKernel with AuthPlugin (@objectstack/verify's bootStack), then the documented embed shape from skills/objectstack-platform/SKILL.md — createHonoApp({ kernel }), i.e. prefix defaulting to /api — with requests injected through the returned app.
POST /api/auth/sign-in/email (valid shape, wrong password) -> 200 {}
GET /api/auth/get-session -> 200 {}
POST /api/auth/sign-up/email -> 200 {}
A failed sign-in answering 200 {} is the silent-success shape.
Why
packages/adapters/hono/src/index.ts mounts app.all(FIELD_PREFIX + '/auth/*') and forwards the request unchanged to the kernel's auth service. AuthManager hands it to better-auth, which matches against its own configured basePath, defaulting to /api/v1/auth (packages/plugins/plugin-auth/src/auth-plugin.ts line 327, auth-manager.ts line 1254). With the adapter's default prefix the wire path is /api/auth/..., which is not under that base, so better-auth routes nothing:
Every one of those 404s is then yielded to the adapter's own terminal FIELD_PREFIX + '/*' dispatcher catch-all, which answers 200 {} for paths under /auth/ (see the sibling finding on that). The same measurement confirms the two do line up when the prefix is set to /api/v1: there ownsRoute('POST', '/api/v1/auth/delete-user') is true and the real auth surface answers.
What is NOT measured here
Which of the two defaults is the wrong one. Moving the adapter's default, moving the auth default, or refusing the mismatch loudly at boot are three different decisions with different blast radii — this card records the composition failure, not the remedy.
Anything about plugin-hono-server, which mounts auth itself and is unaffected.
Note
A loud refusal is worth considering over a silent default change: the failure mode today is not "auth 404s", which someone would notice, but "auth answers 200 {}", which reads as success on every call.
Measured, on a real boot through the adapter
Found while measuring #15928; out of that card's scope (that card is about which 404 the
/auth/*mount may yield, this is about the mount never reaching better-auth at all). Filed unassigned.Boot: a real
ObjectKernelwithAuthPlugin(@objectstack/verify'sbootStack), then the documented embed shape fromskills/objectstack-platform/SKILL.md—createHonoApp({ kernel }), i.e.prefixdefaulting to/api— with requests injected through the returned app.A failed sign-in answering
200 {}is the silent-success shape.Why
packages/adapters/hono/src/index.tsmountsapp.all(FIELD_PREFIX + '/auth/*')and forwards the request unchanged to the kernel'sauthservice.AuthManagerhands it to better-auth, which matches against its own configuredbasePath, defaulting to/api/v1/auth(packages/plugins/plugin-auth/src/auth-plugin.tsline 327,auth-manager.tsline 1254). With the adapter's default prefix the wire path is/api/auth/..., which is not under that base, so better-auth routes nothing:Every one of those 404s is then yielded to the adapter's own terminal
FIELD_PREFIX + '/*'dispatcher catch-all, which answers200 {}for paths under/auth/(see the sibling finding on that). The same measurement confirms the two do line up when the prefix is set to/api/v1: thereownsRoute('POST', '/api/v1/auth/delete-user')istrueand the real auth surface answers.What is NOT measured here
@objectstack/honohas no in-repo consumer (adapters/hono 的 ${prefix}/auth/* 与 ${prefix}/storage/* 是终结式通配 —— 与 #4088 同一缺陷,只是这个包在仓内没有消费者 #4117 already recorded that), so nothing here can answer it.plugin-hono-server, which mounts auth itself and is unaffected.Note
A loud refusal is worth considering over a silent default change: the failure mode today is not "auth 404s", which someone would notice, but "auth answers
200 {}", which reads as success on every call.