{"id":154,"date":"2026-03-25T14:20:42","date_gmt":"2026-03-25T13:20:42","guid":{"rendered":"https:\/\/www.1coachcarriere.com\/?page_id=154"},"modified":"2026-04-18T09:53:17","modified_gmt":"2026-04-18T07:53:17","slug":"reset-password","status":"publish","type":"page","link":"https:\/\/www.1coachcarriere.com\/index.php\/reset-password\/","title":{"rendered":"Reset Password"},"content":{"rendered":"\n<div id=\"careercoach-reset-root\" style=\"max-width:720px;margin:40px auto;padding:32px;border:1px solid #e5e7eb;border-radius:16px;background:#ffffff;font-family:Arial,sans-serif;box-shadow:0 10px 30px rgba(0,0,0,0.06);\">\n  <h1 style=\"margin-top:0;font-size:34px;line-height:1.1;color:#111827;\">Reset your password<\/h1>\n  <p style=\"font-size:18px;line-height:1.6;color:#374151;\">\n    Set a new password for your CareerCoach account.\n  <\/p>\n  <div id=\"reset-status\" style=\"margin-top:24px;padding:18px 20px;border-radius:12px;background:#f3f4f6;color:#111827;\">\n    Ready to reset your password.\n  <\/div>\n  <form id=\"reset-form\" style=\"margin-top:24px;\">\n    <label for=\"new-password\" style=\"display:block;font-weight:700;color:#111827;margin-bottom:8px;\">New password<\/label>\n    <input id=\"new-password\" type=\"password\" minlength=\"10\" required style=\"width:100%;padding:14px 16px;border:1px solid #d1d5db;border-radius:10px;font-size:16px;box-sizing:border-box;\" \/>\n    <p style=\"margin-top:10px;color:#6b7280;font-size:14px;\">Use at least 10 characters.<\/p>\n    <button id=\"reset-submit-btn\" type=\"submit\" style=\"margin-top:20px;background:#111827;color:#ffffff;border:none;border-radius:10px;padding:12px 18px;font-size:16px;cursor:pointer;\">\n      Update password\n    <\/button>\n  <\/form>\n<\/div>\n\n<script>\n(function () {\n  var apiBase = \"https:\/\/careercoach-actions-api-780560323101.us-central1.run.app\";\n  var statusEl = document.getElementById(\"reset-status\");\n  var formEl = document.getElementById(\"reset-form\");\n  var passwordEl = document.getElementById(\"new-password\");\n  var submitBtn = document.getElementById(\"reset-submit-btn\");\n  var params = new URLSearchParams(window.location.search);\n  var email = params.get(\"email\") || \"\";\n  var resetToken = params.get(\"reset_token\") || \"\";\n\n  function setStatus(message, bg, color) {\n    statusEl.textContent = message;\n    statusEl.style.background = bg;\n    statusEl.style.color = color;\n  }\n\n  if (!email || !resetToken) {\n    setStatus(\"This reset link is incomplete. Please request a new password reset email.\", \"#fef3c7\", \"#92400e\");\n    formEl.style.display = \"none\";\n    return;\n  }\n\n  formEl.addEventListener(\"submit\", async function (event) {\n    event.preventDefault();\n\n    var newPassword = passwordEl.value.trim();\n    if (newPassword.length < 10) {\n      setStatus(\"Your new password must contain at least 10 characters.\", \"#fef3c7\", \"#92400e\");\n      return;\n    }\n\n    submitBtn.disabled = true;\n    submitBtn.textContent = \"Updating...\";\n    setStatus(\"Updating your password...\", \"#f3f4f6\", \"#111827\");\n\n    try {\n      var response = await fetch(apiBase + \"\/auth\/confirm_password_reset\", {\n        method: \"POST\",\n        headers: {\n          \"Content-Type\": \"application\/json\"\n        },\n        body: JSON.stringify({\n          email: email,\n          reset_token: resetToken,\n          new_password: newPassword\n        })\n      });\n\n      var data = await response.json().catch(function () {\n        return { error: \"Unknown error\" };\n      });\n\n      if (response.ok) {\n        setStatus(\"Your password has been updated. You can now return to CareerCoach and sign in.\", \"#dcfce7\", \"#166534\");\n        formEl.style.display = \"none\";\n        return;\n      }\n\n      setStatus(data.error || \"Password reset failed.\", \"#fee2e2\", \"#991b1b\");\n    } catch (error) {\n      setStatus(\"A network error occurred while updating your password.\", \"#fee2e2\", \"#991b1b\");\n    } finally {\n      submitBtn.disabled = false;\n      submitBtn.textContent = \"Update password\";\n    }\n  });\n})();\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>Reset your password Set a new password for your CareerCoach account. Ready to reset your password. New password Use at least 10 characters. Update password<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-154","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.1coachcarriere.com\/index.php\/wp-json\/wp\/v2\/pages\/154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.1coachcarriere.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.1coachcarriere.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.1coachcarriere.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.1coachcarriere.com\/index.php\/wp-json\/wp\/v2\/comments?post=154"}],"version-history":[{"count":4,"href":"https:\/\/www.1coachcarriere.com\/index.php\/wp-json\/wp\/v2\/pages\/154\/revisions"}],"predecessor-version":[{"id":171,"href":"https:\/\/www.1coachcarriere.com\/index.php\/wp-json\/wp\/v2\/pages\/154\/revisions\/171"}],"wp:attachment":[{"href":"https:\/\/www.1coachcarriere.com\/index.php\/wp-json\/wp\/v2\/media?parent=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}