redirects for edu and canvas for .org

do2
Matthew 2025-03-20 18:51:21 -04:00
parent dd97c840b6
commit a353eda89a
Signed by: matthew
SSH Key Fingerprint: SHA256:piIXekA9q1p0ZGi4ogFbNY1embip5Ytbi3v8AZ8UYq4
2 changed files with 81 additions and 0 deletions

View File

@ -22,6 +22,11 @@ server {
client_max_body_size 50M;
# Serve the static login discovery page at /login-discovery
location = /login-discovery {
default_type text/html;
alias /var/www/html/canvas-login-discovery.html;
}
location / {
try_files $uri @app;

View File

@ -0,0 +1,76 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login to Canvas</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
background-color: #f4f4f4;
padding: 50px;
}
.login-container {
background: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
display: inline-block;
max-width: 400px;
}
.login-container img {
max-width: 100%;
height: auto;
margin-bottom: 20px;
}
h2 {
margin-bottom: 20px;
}
.login-button {
display: block;
width: 100%;
padding: 12px;
margin: 10px 0;
border: none;
border-radius: 5px;
font-size: 16px;
cursor: pointer;
}
.enterprise-login {
background-color: #0057B8;
color: white;
}
.google-login {
background-color: #4285F4;
color: white;
}
.login-button:hover {
opacity: 0.9;
}
footer {
margin-top: 30px;
font-size: 14px;
color: #777;
}
</style>
</head>
<body>
<div class="login-container">
<!-- Canvas Image -->
<img src="https://www.libraryofcode.org/storage/2025/03/Canvas_Horizontal_ByInstructure_Color_RGB.webp" alt="Canvas Image">
<h2>Login to Canvas</h2>
<p><i>Staff should use Enterprise Login.</i></p>
<button class="login-button enterprise-login" onclick="window.location.href='https://canvas.libraryofcode.org/login/saml'">
Enterprise Login with Okta (@libraryofcode.org)
</button>
<button class="login-button google-login" onclick="window.location.href='https://canvas.libraryofcode.org/login/google'">
Login with Google Workspace (@libraryofcode.dev)
</button>
</div>
<footer>
<a target="_blank" href="https://www.libraryofcode.org">Library of Code, Inc. | Division of Education | Department of Operations</a>
</footer>
</body>
</html>