<template>
  <n-button type="primary" @click="login">登录</n-button>


  <n-button @click="handleLogin">Log out</n-button>
</template>

<script setup>
import { useAuth0 } from '@auth0/auth0-vue';
const { loginWithRedirect,logout  } = useAuth0();
const login = () => {
  loginWithRedirect();
}
const handleLogin =  () => {
  logout({ logoutParams: { returnTo: window.location.origin } });
}
</script>

<style lang="scss" scoped></style>