Skip to content

Commit

Permalink
mansar.io
Browse files Browse the repository at this point in the history
  • Loading branch information
MuneebAnsari committed Apr 18, 2024
1 parent 38bd7e6 commit 22af162
Showing 1 changed file with 33 additions and 28 deletions.
61 changes: 33 additions & 28 deletions verifyemail/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@
class="logo"
/>

<p>
A verification email has been sent to you. Please follow the
instructions in the email to complete the process.
</p>
<p id="message"></p>

<!-- <button onclick="callback()">Continue</button> -->

Expand Down Expand Up @@ -91,37 +88,40 @@
return params;
}

function showContainer(message, status) {
const container = document.querySelector(".container");
const continueButton = document.createElement("button");
continueButton.textContent = "Continue";
continueButton.onclick =
status === "true" ? loginCallback : logoutCallback;
const messageElement = document.createElement("p");
messageElement.textContent = message;
// function showContainer(message, status) {
// const container = document.querySelector(".container");
// const continueButton = document.createElement("button");
// continueButton.textContent = "Continue";
// continueButton.onclick =
// status === "true" ? loginCallback : logoutCallback;
// const messageElement = document.createElement("p");
// messageElement.textContent = message;

container.innerHTML = "";
container.appendChild(messageElement);
container.appendChild(continueButton);
container.style.display = "block";
}
// container.innerHTML = "";
// container.appendChild(messageElement);
// container.appendChild(continueButton);
// container.style.display = "block";
// }

const queryParams = getQueryParams();
if (queryParams.success === "true") {
const message = queryParams.message || "Email Verification Successful";
showContainer(message, queryParams.success);
} else if (queryParams.success === "false") {
const message = queryParams.message || "Email Verification Failed";
showContainer(message, queryParams.success);
} else {
const container = document.querySelector(".container");
container.style.display = "block";
}
// const queryParams = getQueryParams();
// if (queryParams.success === "true") {
// const message = queryParams.message || "Email Verification Successful";
// showContainer(message, queryParams.success);
// } else if (queryParams.success === "false") {
// const message = queryParams.message || "Email Verification Failed";
// showContainer(message, queryParams.success);
// } else {
// const container = document.querySelector(".container");
// container.style.display = "block";
// }

function getState() {
const urlParams = new URLSearchParams(window.location.search);
return urlParams.get("state");
}
function getEmail() {
return getQueryParams.email;
}
function getSessionToken() {
const urlParams = new URLSearchParams(window.location.search);
return urlParams.get("session_token");
Expand Down Expand Up @@ -153,6 +153,11 @@
"com.etr407.ciam.androidharness://login.mansar.io/custom/login";
}

const queryParams = getQueryParams();
const message = document.getElementById("message");
message.innerText = `A verification email has been sent to ${queryParams.email}. Please follow the instructions
in the email to complete the process.`;

// async function importKey(data) {
// var key = await crypto.subtle.importKey(
// "raw",
Expand Down

0 comments on commit 22af162

Please sign in to comment.