mirror of
https://github.com/OpenSquawk/OpenSquawk
synced 2026-08-08 02:25:36 +08:00
Three dead ends, one cause: these routes resolved to pages that stayed on the website, and nothing here answered them any more. /start — this page became the app's front page in the split (it is index.vue now), so every pre-split bookmark and the website's own redirect landed on a 404. Caught here so the app's old URLs work without waiting for the website to be redeployed. /login — the app has no login by design, identity comes from the issuer. But five call sites still send people there: logout, the live-atc session guard, the bridge pairing screen. In the monorepo that path was the website's login form; since the split it was nothing, so signing out dropped the user on a blank page. It is a forwarder to the issuer, not a login form. /logout — after clearing the app session it sent the user to /login, which under SSO means an issuer where they are still signed in: they would be handed a fresh code and land straight back inside. It now signs them out at the issuer too, which bumps tokenVersion and invalidates every refresh token. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
50 lines
1.5 KiB
Vue
50 lines
1.5 KiB
Vue
<template>
|
||
<div class="min-h-screen bg-[#0b1020] text-white">
|
||
<div class="mx-auto flex min-h-screen max-w-xl flex-col items-center justify-center gap-6 px-6 text-center">
|
||
<div class="space-y-3">
|
||
<p class="text-xs uppercase tracking-[0.3em] text-cyan-300/80">OpenSquawk</p>
|
||
<h1 class="text-3xl font-semibold">Signing you out…</h1>
|
||
<p class="text-sm text-white/70">
|
||
We're logging you out and will redirect you in a moment.
|
||
</p>
|
||
</div>
|
||
<v-progress-circular indeterminate size="40" width="3" color="cyan" />
|
||
<NuxtLink to="/login" class="text-sm text-cyan-300 underline">Back to login</NuxtLink>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<script setup lang="ts">
|
||
import { onMounted } from 'vue'
|
||
import { useRouter } from 'vue-router'
|
||
import { useAuthStore } from '~/stores/auth'
|
||
|
||
const router = useRouter()
|
||
const auth = useAuthStore()
|
||
const config = useRuntimeConfig()
|
||
|
||
useHead({
|
||
title: 'Logout – OpenSquawk',
|
||
meta: [
|
||
{ name: 'robots', content: 'noindex' },
|
||
],
|
||
})
|
||
|
||
onMounted(async () => {
|
||
await auth.logout()
|
||
|
||
// Sign out at the issuer too. Sending the user to the app's own /login would
|
||
// only forward them back to an issuer where they are still signed in — they
|
||
// would be handed a fresh code and land straight back inside, which is not
|
||
// what "log out" means.
|
||
const issuer = String(config.public.authIssuer || '').replace(/\/+$/, '')
|
||
if (issuer) {
|
||
return navigateTo(`${issuer}/logout`, { external: true })
|
||
}
|
||
|
||
router.replace('/')
|
||
})
|
||
</script>
|
||
|
||
|