Root cause: the router-guard adapter let index.vue mount and call the API before auth resolved, so auth.fetch returned a synthetic 401 (the banner) and the package's redirect-loop guard could strand the user. Now use the core ZitadelAuth and gate in an async plugin (Nuxt awaits it before mount), mirroring the working krypto-kuns app.
24 lines
470 B
Vue
24 lines
470 B
Vue
<script setup lang="ts">
|
|
// The auth plugin completes the OIDC code exchange during init() before mount.
|
|
// This page just returns to the app root.
|
|
onMounted(() => {
|
|
navigateTo("/", { replace: true });
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<main class="callback">
|
|
<p>Signing you in…</p>
|
|
</main>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.callback {
|
|
min-height: 100dvh;
|
|
display: grid;
|
|
place-items: center;
|
|
color: #6b7280;
|
|
font: 500 1rem/1.4 system-ui, sans-serif;
|
|
}
|
|
</style>
|