📜  Nuxt:注销后 Nuxt 身份验证未重定向 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:15.838000             🧑  作者: Mango

代码示例1
stack overflow url: https://stackoverflow.com/questions/67348504/nuxt-auth-not-redirecting-after-logout

export default {
    methods:  {
        async logout () { 
            await this.$auth.logout() 
            this.$router.push('login');
        }
    }
}