From dddef149aea597a145e3717b2c461b251e0f6a8d Mon Sep 17 00:00:00 2001
From: memdmp <memdmp@estrogen.zone>
Date: Wed, 20 Aug 2025 13:39:01 +0200
Subject: feat: oidc attempt 82845345

---
 src/routes/+layout.svelte | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

(limited to 'src/routes/+layout.svelte')

diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 1980c3a..dc81706 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -13,8 +13,16 @@
 <nav class="header">
   <h1 class="text-4xl">crunched</h1>
   <p>
-    <a href="/">home</a> - {#if page.data.session}<a href="/vms">vms</a
-      >{:else}<a href="/login?scope=profile%20vm-own-read">login</a>{/if}
+    <a href="/">home</a> - {#if page.data.session}<a href="/vms">vms</a> -
+      <a
+        href="/login/undo?next={encodeURIComponent(
+          page.url.pathname + page.url.search
+        )}">logout</a
+      >{:else}<a
+        href="/login?scope=default&next={encodeURIComponent(
+          page.url.pathname + page.url.search
+        )}">login</a
+      >{/if}
   </p>
   <div class="my-2">
     <hr />
-- 
cgit v1.2.3

