{"id":161,"date":"2026-03-25T14:35:58","date_gmt":"2026-03-25T13:35:58","guid":{"rendered":"https:\/\/www.1coachcarriere.com\/?page_id=161"},"modified":"2026-04-18T09:43:29","modified_gmt":"2026-04-18T07:43:29","slug":"verify-email","status":"publish","type":"page","link":"https:\/\/www.1coachcarriere.com\/index.php\/verify-email\/","title":{"rendered":"Verify email"},"content":{"rendered":"\n<div id=\"careercoach-verify-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;\">Verify your email<\/h1>\n  <p style=\"font-size:18px;line-height:1.6;color:#374151;\">\n    We are validating your CareerCoach account.\n  <\/p>\n  <div id=\"verify-status\" style=\"margin-top:24px;padding:18px 20px;border-radius:12px;background:#f3f4f6;color:#111827;\">\n    Processing your verification request&#8230;\n  <\/div>\n  <div id=\"verify-actions\" style=\"margin-top:24px;display:none;\">\n    <p style=\"margin-bottom:12px;color:#374151;\">\n      If the verification link has expired, request a new verification email.\n    <\/p>\n    <button id=\"verify-resend-btn\" type=\"button\" style=\"background:#111827;color:#ffffff;border:none;border-radius:10px;padding:12px 18px;font-size:16px;cursor:pointer;\">\n      Resend verification email\n    <\/button>\n  <\/div>\n<\/div>\n\n<script>\n(function () {\n  var apiBase = \"https:\/\/careercoach-actions-api-780560323101.us-central1.run.app\";\n  var statusEl = document.getElementById(\"verify-status\");\n  var actionsEl = document.getElementById(\"verify-actions\");\n  var resendBtn = document.getElementById(\"verify-resend-btn\");\n  var params = new URLSearchParams(window.location.search);\n  var email = params.get(\"email\") || \"\";\n  var verificationToken = params.get(\"verification_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  function showResend() {\n    actionsEl.style.display = \"block\";\n  }\n\n  async function verifyEmail() {\n    if (!email || !verificationToken) {\n      setStatus(\"This verification link is incomplete. Please request a new verification email.\", \"#fef3c7\", \"#92400e\");\n      showResend();\n      return;\n    }\n\n    try {\n      var response = await fetch(apiBase + \"\/auth\/verify_email\", {\n        method: \"POST\",\n        headers: {\n          \"Content-Type\": \"application\/json\"\n        },\n        body: JSON.stringify({\n          email: email,\n          verification_token: verificationToken\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 email has been verified. You can now return to CareerCoach and sign in.\", \"#dcfce7\", \"#166534\");\n        return;\n      }\n\n      setStatus(data.error || \"Email verification failed.\", \"#fee2e2\", \"#991b1b\");\n      showResend();\n    } catch (error) {\n      setStatus(\"A network error occurred during verification. Please try again.\", \"#fee2e2\", \"#991b1b\");\n      showResend();\n    }\n  }\n\n  resendBtn.addEventListener(\"click\", async function () {\n    resendBtn.disabled = true;\n    resendBtn.textContent = \"Sending...\";\n\n    try {\n      var response = await fetch(apiBase + \"\/auth\/resend_verification_email\", {\n        method: \"POST\",\n        headers: {\n          \"Content-Type\": \"application\/json\"\n        },\n        body: JSON.stringify({\n          email: email\n        })\n      });\n\n      var data = await response.json().catch(function () {\n        return { error: \"Unknown error\" };\n      });\n\n      if (response.ok) {\n        setStatus(data.message || \"If eligible, a new verification email has been sent.\", \"#dbeafe\", \"#1d4ed8\");\n      } else {\n        setStatus(data.error || \"Unable to resend verification email.\", \"#fee2e2\", \"#991b1b\");\n      }\n    } catch (error) {\n      setStatus(\"A network error occurred while resending the verification email.\", \"#fee2e2\", \"#991b1b\");\n    } finally {\n      resendBtn.disabled = false;\n      resendBtn.textContent = \"Resend verification email\";\n    }\n  });\n\n  verifyEmail();\n})();\n<\/script>\n\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Verify your email We are validating your CareerCoach account. Processing your verification request&#8230; If the verification link has expired, request a new verification email. Resend verification email<\/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-161","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.1coachcarriere.com\/index.php\/wp-json\/wp\/v2\/pages\/161","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=161"}],"version-history":[{"count":6,"href":"https:\/\/www.1coachcarriere.com\/index.php\/wp-json\/wp\/v2\/pages\/161\/revisions"}],"predecessor-version":[{"id":169,"href":"https:\/\/www.1coachcarriere.com\/index.php\/wp-json\/wp\/v2\/pages\/161\/revisions\/169"}],"wp:attachment":[{"href":"https:\/\/www.1coachcarriere.com\/index.php\/wp-json\/wp\/v2\/media?parent=161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}