fix(frontend): keep HMAC secret visible for copy after save

API principal HMAC secrets are write-only from the server, so users could
not copy a newly generated or rotated key before the input was cleared.
Retain the plaintext in-session after save, simplify secret field controls,
and add copy guidance across locales.
This commit is contained in:
wizardchen
2026-07-07 16:38:11 +08:00
committed by lyingbug
parent 974231190c
commit f7b427009d
5 changed files with 99 additions and 42 deletions
+2 -1
View File
@@ -5862,7 +5862,8 @@ export default {
tokenHeaderDesc: 'Clients send the backend-signed JWT in this fixed header.',
hmacSecret: 'HMAC secret',
hmacSecretDesc: 'Same secret stored in WeKnora; used only on your backend to sign JWTs—never send it as a request header.',
secretConfigured: 'Secret configured; enter a new value to rotate',
secretConfigured: 'Secret configured (not shown again); enter a new value to rotate',
secretSavedCopyHint: 'Secret saved. Copy it to your backend now — you will not be able to view it again after leaving this page.',
generateSecret: 'Generate secret',
hmacSecretResetConfirmTitle: 'Reset HMAC secret?',
hmacSecretResetConfirmBody: 'After reset, the old HMAC secret is revoked immediately. Every backend service signing JWTs with the old secret must switch to the new secret to keep signed-token calls working. This action cannot be undone.',