Your secret key was shown once at registration and cannot be displayed again. Use "Rotate Key" below to generate a new one.
+
Your login key was shown once at registration. Use "Rotate Key" below to replace it — the new key will be shown immediately.
@@ -47,6 +47,15 @@
Rotate Primary Key
Generates a new primary key. Your old key will stop working immediately. Sub-keys are not affected.
+
+
+
+
⚠️ New primary key — copy it now. This is the only time it will be shown.
+
+
+
+
+
@@ -131,10 +140,17 @@
async function confirmReset() {
if (!confirm('Rotate your primary key?\n\nYour current key will stop working immediately. Make sure to copy the new one.')) return;
const data = await api('/account/reset-key', { method: 'POST', body: {} });
- // New key is shown once — display it in the new-key-reveal area
- document.getElementById('new-key-value').textContent = data.key;
- document.getElementById('new-key-reveal').classList.remove('hidden');
- // Cookie is set server-side by reset-key endpoint
+ document.getElementById('rotated-key-value').textContent = data.key;
+ document.getElementById('rotated-key-reveal').classList.remove('hidden');
+ document.getElementById('rotated-key-reveal').scrollIntoView({ behavior: 'smooth', block: 'nearest' });
+ }
+
+ function copyRotatedKey() {
+ const val = document.getElementById('rotated-key-value').textContent;
+ navigator.clipboard.writeText(val);
+ const btn = event.target;
+ btn.textContent = 'Copied!'; btn.classList.add('text-green-400');
+ setTimeout(() => { btn.textContent = 'Copy'; btn.classList.remove('text-green-400'); }, 1500);
}
function showCreateKey() {