Skip to content

Commit 627e059

Browse files
authored
Update dummy_sso_real.html
1 parent c14e1cb commit 627e059

1 file changed

Lines changed: 25 additions & 5 deletions

File tree

dummy_sso_real.html

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,37 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>Dummy OAuth</title>
4+
<title>Dummy SSO</title>
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
56
</head>
6-
<body>
7+
<body style="display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; margin: 0;">
78
<h2>Dummy OAuth Login</h2>
8-
<button onclick="redirectBack()">Authorize</button>
9+
<button onclick="redirectBack()" style="padding: 16px 24px; font-size: 18px; cursor: pointer; border-radius: 8px;">
10+
Authorize
11+
</button>
912

1013
<script>
14+
let callbackUrl = "";
15+
16+
// Read ?redirect=<url> from query params
17+
function getQueryParam(param) {
18+
const urlParams = new URLSearchParams(window.location.search);
19+
return urlParams.get(param);
20+
}
21+
1122
function redirectBack() {
12-
// Simulate your real HTTPS callback
13-
window.location.href = "https://sb1-god-cipher.mum1.zetaapps.in/chronos/authorization-code/callback?code=67af2a53d3424b4b945b463af5d989ae&state=8bb0710c-820c-46f7-b9df-fc1d31b293b3";
23+
if (callbackUrl) {
24+
window.location.href = callbackUrl;
25+
} else {
26+
alert("No callback URL provided!");
27+
}
1428
}
29+
30+
// On page load
31+
window.onload = function () {
32+
callbackUrl = getQueryParam("redirect");
33+
console.log("Callback URL:", callbackUrl);
34+
};
1535
</script>
1636
</body>
1737
</html>

0 commit comments

Comments
 (0)