devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Forward `onTrusted` from `DevToolsConfig` to the interactive auth handler

Open antfubot opened this issue 2 months ago • 0 comments

#548 lets hosts override the client auth banner via DevToolsConfig, and devframes/devframe#291 added the matching onTrusted option to createInteractiveAuth (in devframe 0.10.0) so a host rendering its own banner can retract it once a code exchange succeeds.

The last link in the chain is missing: getAuthHandler in packages/core/src/node/auth-handler.ts forwards config.banner but not config.onTrusted, and DevToolsConfig has no onTrusted field.

Concretely (mirroring #548):

  • add onTrusted?: CreateInteractiveAuthOptions['onTrusted'] to DevToolsConfig
  • forward it in getAuthHandler alongside banner (presumably skipping the build-capability branch, where the banner is already silenced and trust comes from the capability token rather than a code exchange)

Context: this is the remaining unticked item ("forward onTrusted through vitejs/devtools") in nuxt/devtools#1080. Nuxt DevTools now routes the banner through Nuxt CLI 4's TUI as a sticky notice (nuxt/devtools#1093) and already sets onTrusted in the devtools config, so the notice starts auto-retracting on a successful exchange as soon as this is forwarded and released.


This issue was created with the help of an agent.

antfubot avatar Sep 15 '26 05:09 antfubot