1
0
Files
coldcall_lti/coldcall_lti/templates/cookies_allowed_js_check.html
Benjamin Mako Hill 921f5d1c8a Add cookie-check template and saltire testing documentation
The real-handshake test against the saltire LTI platform emulator
turned up a launch bug dev mode cannot reach: pylti1p3's Flask adapter
requires the application to supply the cookies_allowed_js_check.html
template used by enable_check_cookies(), and without it every OIDC
login 500s. The template tests whether cookies survive, then re-enters
the login flow or offers a new-window fallback.

docs/SALTIRE.md records the verified test setup: local HTTPS with a
self-signed certificate, the platform description for
instance/lti_config.json, the saltire-side configuration, and the
session-id caveat on saltire's token/jwks URLs. The 2026-08-01 run
verified the full OIDC handshake, JWT validation, NRPS roster sync
over the wire, and instructor/learner role routing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 18:53:53 -07:00

34 lines
1016 B
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{ loading_text }}</title>
<style>
body { font-family: system-ui, sans-serif; margin: 2rem; }
</style>
</head>
<body>
<p id="loading">{{ loading_text }}</p>
<div id="blocked" style="display:none">
<p>{{ main_text }}</p>
<p><a href="#" id="newwin">{{ click_text }}</a></p>
</div>
<script>
var params = {{ params | tojson }};
var target = window.location.pathname + "?" +
new URLSearchParams(params).toString();
document.cookie = "lti1p3_cc=1; path=/; SameSite={{ 'None; Secure' if protocol == 'https' else 'Lax' }}";
if (document.cookie.indexOf("lti1p3_cc=") !== -1) {
window.location = target;
} else {
document.getElementById("loading").style.display = "none";
document.getElementById("blocked").style.display = "block";
document.getElementById("newwin").addEventListener("click", function (e) {
e.preventDefault();
window.open(target, "_blank");
});
}
</script>
</body>
</html>