💄 Optimize authorize third party client loading process
This commit is contained in:
parent
542f81d9c2
commit
2f14e3817a
@ -75,18 +75,18 @@ definePageMeta({
|
|||||||
middleware: ["auth"],
|
middleware: ["auth"],
|
||||||
})
|
})
|
||||||
|
|
||||||
const config = useRuntimeConfig()
|
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
const error = ref<string | null>(null)
|
const error = ref<string | null>(null)
|
||||||
const loading = ref(false)
|
const loading = ref(true)
|
||||||
|
|
||||||
const metadata = ref<any>(null)
|
const metadata = ref<any>(null)
|
||||||
|
|
||||||
const panel = ref("confirm")
|
const panel = ref("confirm")
|
||||||
|
|
||||||
async function tryAuthorize() {
|
async function tryAuthorize() {
|
||||||
|
loading.value = true
|
||||||
|
|
||||||
const res = await solarFetch(`/cgi/auth/auth/o/authorize${window.location.search}`)
|
const res = await solarFetch(`/cgi/auth/auth/o/authorize${window.location.search}`)
|
||||||
|
|
||||||
if (res.status !== 200) {
|
if (res.status !== 200) {
|
||||||
@ -104,7 +104,7 @@ async function tryAuthorize() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tryAuthorize()
|
onMounted(() => tryAuthorize())
|
||||||
|
|
||||||
function decline() {
|
function decline() {
|
||||||
if (window.history.length > 0) {
|
if (window.history.length > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user