Skip to content

Dashboard: the header offers API key sign-in in API key mode - #305

Merged
msx752 merged 1 commit into
developfrom
fix/dashboard-header-api-key-mode
Nov 26, 2026
Merged

msx752 merged 1 commit into
developfrom
fix/dashboard-header-api-key-mode

Conversation

@msx752

@msx752 msx752 commented Nov 26, 2026

Copy link
Copy Markdown
Owner

The header's sign-in form looked for the auth mode bearer, but the server sends apikey (AuthMode.ApiKey, lower-cased). In API key mode the header took the mode for none and showed nothing when a request was refused: after a 401 (a rotated key, an expired session) the page showed empty data and no way to sign in again without reloading.

Change

  • AuthHeader.vue recognises apikey for its API key form (internally it still calls it bearer, as the key is sent as a Bearer token).

What does not change

  • The server, the sign-in page, basic and host modes.

Testing

  • In a browser (sample app with WithApiKey): signed in, the stored key made invalid, the next request answered 401.
    • Before: the header had no input and no Login button.
    • After: "API Key Authentication Required", a key field, a Login button and "Session expired. Please log in again."; signing in from the header with the right key works ("api-user / Logout").
  • The dashboard suite passes, vue-tsc --build clean, no new lint messages. This PR changes no .NET file; every .NET test project passed on the same develop base.
  • An independent review of the diff found no other place in the sign-in flow that expects bearer from the server. It found one outside it: the live-update connection (hub/base/baseHub.ts) has the same mismatch, so in API key mode live updates do not arrive. That is reported separately, not changed here.

The header looked for the auth mode 'bearer', but the server sends
'apikey' (AuthMode.ApiKey). In API key mode the header took the mode for
'none' and showed nothing when a request was refused: after a 401 (a
rotated key, an expired session) there was no way to sign in again
without reloading the page.

The header now recognises 'apikey'. It shows its API key form with the
"Session expired" message, and signing in from it works again.
@msx752
msx752 merged commit 77ed4eb into develop Nov 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant