<script setup lang="ts">
/**
 * OAuth callback page.
 *
 * Handles the redirect from OAuth providers (Google, Discord).
 * Extracts tokens from URL fragment and stores them in auth store.
 */
import { onMounted } from 'vue'
import { useRouter } from 'vue-router'

const router = useRouter()

onMounted(() => {
  // TODO: Extract tokens from URL hash fragment
  // TODO: Store tokens in auth store
  // TODO: Fetch user profile
  // TODO: Redirect to intended destination or home

  // Placeholder: redirect to home after brief delay
  setTimeout(() => {
    router.push('/')
  }, 1000)
})
</script>

<template>
  <div class="flex min-h-screen items-center justify-center">
    <div class="text-center">
      <div class="mb-4 text-lg">
        Completing login...
      </div>
      <div class="text-sm text-gray-500">
        Please wait
      </div>
    </div>
  </div>
</template>
