T10.6 D13 - strip the password UI; "Forgot password?" goes to Okta
login.html/login.js: the two reset views are gone along with the reset-token handling, and the sign-in form now says which password to type - "your Windows password, the same one you use to sign in to your computer" - using the .hint class the page already had, so no new CSS and no new literal. "Forgot password?" is KEPT and points at https://primecontrols.okta.com/. An earlier draft of this task deleted the link and I proposed a plain "contact IT" sentence instead; Okta is the better answer, and with no app password and no break-glass it is the only recovery path that exists. Three details that would each have broken it: - The old click handler on #forgot-link called preventDefault() to swap views. Left in place it would have silently swallowed the navigation, so the link would look right and do nothing. There is now deliberately no handler, and login.js says why so nobody adds one back. - target="_blank" without rel="noopener noreferrer" hands the opened page a window.opener handle back to the login page. - Worth recording since it was checked rather than assumed: the CSP allows this. form-action 'self' governs form submission, not link navigation, and no navigate-to directive is set - so a plain <a href> off-origin is fine and the nginx config needs no change. login.js also handles 503 distinctly now. T10.2 made that mean "the directory is unreachable or misconfigured", which is our fault - showing "invalid password" would send people hunting for a password they no longer have while a deploy is broken. Also removed, because T10.3 deleted the endpoints behind them and leaving them would have produced visible 404s rather than dead-but-harmless markup: auth-guard.js the whole change-password dialog (POST /api/auth/password) wp-sidenav.js the "Password / Change your password" menu entry that opened it users.js the per-row "Reset password" action users.js the password field in the create-account form - NewUserIn no users.html longer accepts one, so the form was posting a rejected field The self-row placeholder button pointed at a top-bar Password link that no longer exists; it is now a plain "you" marker. Verified: node --check passes on all four touched JS files; the only password references left in html/ are the sign-in form and the SMTP config in admin.js, which is unrelated and stays. Logged BL-027 rather than acted on: the Okta URL is the first sign of an Okta tenant on this estate, which means an OIDC flow is available in principle and would remove the domain-lockout hazard that forced AUTH_MAX_ATTEMPTS to 2. D13 was decided and reaffirmed and T10.1-T10.4 are built, so swapping the mechanism mid-wave is the reordering CLAUDE.md forbids. Recording is not reopening. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -112,47 +112,16 @@
|
||||
<label for="password">Password</label>
|
||||
<input id="password" name="password" type="password" autocomplete="current-password" required>
|
||||
</div>
|
||||
<div class="hint">Use your Windows password — the same one you use to sign in to your computer.</div>
|
||||
<button id="submit" type="submit">Sign in</button>
|
||||
</form>
|
||||
<p class="center"><a href="#" id="forgot-link" class="link">Forgot password?</a></p>
|
||||
</section>
|
||||
|
||||
<!-- FORGOT PASSWORD (email reset) -->
|
||||
<section id="view-forgot" style="display:none">
|
||||
<h1>Reset password</h1>
|
||||
<p class="sub">We'll email you a link to set a new one.</p>
|
||||
<div id="forgot-unavailable" class="note" style="display:none">
|
||||
Password reset by email isn't switched on yet. Contact your project admin and
|
||||
they'll set a new password for you. Once you're signed in you can change it
|
||||
yourself from the menu in the top-right corner.
|
||||
</div>
|
||||
<form id="forgot-form" autocomplete="on">
|
||||
<div class="field">
|
||||
<label for="forgot-username">Username or email</label>
|
||||
<input id="forgot-username" type="text" autocomplete="username" required>
|
||||
</div>
|
||||
<button id="forgot-submit" type="submit">Email me a reset link</button>
|
||||
</form>
|
||||
<p class="center"><a href="#" id="back-to-login" class="link">← Back to sign in</a></p>
|
||||
</section>
|
||||
|
||||
<!-- SET A NEW PASSWORD (arrived from the emailed link) -->
|
||||
<section id="view-reset" style="display:none">
|
||||
<h1>Set a new password</h1>
|
||||
<p class="sub">Choose a password you don't use anywhere else.</p>
|
||||
<form id="reset-form" autocomplete="on">
|
||||
<div class="field">
|
||||
<label for="new-password">New password</label>
|
||||
<input id="new-password" type="password" autocomplete="new-password" autofocus required>
|
||||
</div>
|
||||
<div class="hint">At least 12 characters.</div>
|
||||
<div class="field">
|
||||
<label for="new-password2">Confirm new password</label>
|
||||
<input id="new-password2" type="password" autocomplete="new-password" required>
|
||||
</div>
|
||||
<button id="reset-submit" type="submit">Set password & sign in</button>
|
||||
</form>
|
||||
<p class="center"><a href="#" id="reset-to-login" class="link">← Back to sign in</a></p>
|
||||
<!-- D13: there is no app password to reset. Self-service goes to Okta.
|
||||
A plain external link, not a form post — CSP sets form-action 'self'
|
||||
and does not set navigate-to, so link navigation off-origin is allowed.
|
||||
rel="noopener noreferrer" because target="_blank" without it hands the
|
||||
opened page a window.opener handle back to this one. -->
|
||||
<p class="center"><a href="https://primecontrols.okta.com/" id="forgot-link" class="link"
|
||||
target="_blank" rel="noopener noreferrer">Forgot password?</a></p>
|
||||
</section>
|
||||
|
||||
<p class="foot">Authorized use only · BTG / Pilot</p>
|
||||
|
||||
Reference in New Issue
Block a user