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
const logoutUrl = `${logtoEndpoint}/oidc/session/end`;
console.log(`Using Logto endpoint: ${logtoEndpoint}`);
console.log(`Full logout URL: ${logoutUrl}`);
try {
// 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...";
---
<main class="min-h-screen flex items-center justify-center">
<div id="content" class="text-center">
<p class="text-2xl font-medium">Redirecting to dashboard...</p>
<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>
<html lang="en" data-theme="dark">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{title} | IEEE UCSD</title>
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
</head>
<body class="bg-base-200">
<main class="min-h-screen flex items-center justify-center">
<div id="content" class="text-center">
<p class="text-2xl font-medium">Redirecting to dashboard...</p>
<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>