<script setup lang="ts">
import { setAuthen } from "@/plugins/auth";
import { onMounted } from "vue";
import { useRoute } from "vue-router";

const route = useRoute();

onMounted(async () => {
  if (route.query.token && route.query.accessToken) {
    const params = await {
      access_token: route.query.token,
      expires_in: route.query.expires ? route.query.expires : 36000,
      refresh_token: route.query.accessToken,
    };
    setAuthen(params, "y");
  }
});
</script>

<template>
  <div></div>
</template>
