Repository navigation
fix: dashboard gate shows a login form instead of a JSON 403 (#79) - #160
Merged
Merged
Conversation
Without ?token= the gated page answered with a raw JSON error — cryptic for an operator. The gate now serves a minimal login form (no project data, still 403): paste the operator token once, or be auto-forwarded when localStorage already holds it. The operator gate itself is unchanged — the data endpoint still requires auth-v2 proofs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Проблема
Оператор открыл
/dashboardи увидел сырой JSON{"error":{"code":"UNAUTHORIZED",...}}— гейт страницы из #157 отвечал машинной ошибкой вместо человекочитаемой формы. Классический chicken-and-egg: страница gated, значит её собственная форма логина недоступна без токена.Фикс
Гейт теперь отдаёт минимальную HTML-форму логина (статус 403,
text/html): поле для operator-токена, авто-переход если токен уже в localStorage. Форма не несёт ни данных проекта, ни операционной поверхности — гейт не ослаблен: данные по-прежнему только через auth-v2 proofs, страница дашборда — только с валидным operator-токеном.Тест обновлён: 403 отдаёт
text/htmlс формой (assert по content-type и содержимому), валидный токен — дашборд как раньше.Verify зелёный: 137 файлов / 1237 тестов.