🐛 Fix auth callback

This commit is contained in:
2025-10-06 21:29:44 +08:00
parent 367db215cf
commit b14af9675c
2 changed files with 5 additions and 4 deletions

View File

@@ -13,18 +13,19 @@
<script lang="ts" setup>
const route = useRoute()
const provider = route.params.provider as string
const query = route.fullPath.split('?')[1] || ''
const apiBase = useSolarNetworkUrl()
const redirectUrl = `${apiBase}/id/auth/callback/${provider}?${query}`
useHead({
title: "Redirecting..."
title: "Redirecting"
})
definePageMeta({
layout: "minimal"
})
await navigateTo(redirectUrl, { external: true })
onMounted(() => {
const redirectUrl = `${apiBase}/id/auth/callback/${provider}${window.location.search}`
window.location.href = redirectUrl
})
</script>

View File

@@ -0,0 +1,21 @@
<template>
<div class="d-flex align-center justify-center fill-height">
<v-card class="pa-6 text-center" max-width="400">
<v-card-text>
<v-icon size="64" color="success" class="mb-4">mdi-check-circle</v-icon>
<h2 class="text-xl font-bold">Auth completed</h2>
<p class="opacity-80">Now you can close this tab</p>
</v-card-text>
</v-card>
</div>
</template>
<script lang="ts" setup>
useHead({
title: "Auth Completed"
})
definePageMeta({
layout: "minimal"
})
</script>