26 lines
556 B
Vue
26 lines
556 B
Vue
<template>
|
|
<div>Processing login...</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import {onMounted} from "vue";
|
|
import {useRouter} from "vue-router";
|
|
import {useAuthStore} from "../stores/auth.ts";
|
|
|
|
const router = useRouter();
|
|
const authStore = useAuthStore();
|
|
|
|
onMounted(async () => {
|
|
try {
|
|
await authStore.handleCallback()
|
|
await router.push('/'); // Redirect to home after login
|
|
} catch (error) {
|
|
console.error('Login callback error:', error);
|
|
await router.push('/error'); // Handle errors
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
</style> |