redefined logout fix

This commit is contained in:
chark1es 2025-04-05 03:24:10 -07:00
parent 961ef1437a
commit 3533dc8048
3 changed files with 1002 additions and 869 deletions

View file

@ -32,6 +32,9 @@ export const GET: APIRoute = async ({ request, redirect }) => {
// Make a POST request to the Logto session end endpoint with the redirect in the body // Make a POST request to the Logto session end endpoint with the redirect in the body
const logoutUrl = `${logtoEndpoint}/oidc/session/end`; const logoutUrl = `${logtoEndpoint}/oidc/session/end`;
console.log(`Using Logto endpoint: ${logtoEndpoint}`);
console.log(`Full logout URL: ${logoutUrl}`);
try { try {
// Try to make a POST request with the redirect in the body and client ID // Try to make a POST request with the redirect in the body and client ID

File diff suppressed because it is too large Load diff

View file

@ -3,15 +3,25 @@ import Layout from "../layouts/Layout.astro";
const title = "Authenticating..."; const title = "Authenticating...";
--- ---
<main class="min-h-screen flex items-center justify-center"> <html lang="en" data-theme="dark">
<div id="content" class="text-center"> <head>
<p class="text-2xl font-medium">Redirecting to dashboard...</p> <meta charset="UTF-8" />
<div class="mt-4"> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<div class="loading loading-spinner loading-lg"></div> <title>{title} | IEEE UCSD</title>
</div> <link rel="icon" type="image/x-icon" href="/favicon.ico" />
</div> </head>
</main> <body class="bg-base-200">
<script> <main class="min-h-screen flex items-center justify-center">
import { RedirectHandler } from "../scripts/auth/RedirectHandler"; <div id="content" class="text-center">
new RedirectHandler(); <p class="text-2xl font-medium">Redirecting to dashboard...</p>
</script> <div class="mt-4">
<div class="loading loading-spinner loading-lg"></div>
</div>
</div>
</main>
<script>
import { RedirectHandler } from "../scripts/auth/RedirectHandler";
new RedirectHandler();
</script>
</body>
</html>