nuxt-module-alternatives
nuxt-module-alternatives copied to clipboard
[auth] Cannot get user information
Heyyy,
i need help please, loggedIn stay in false
nuxt.config.ts:
import { defineNuxtConfig } from "nuxt";
export default defineNuxtConfig({
modules: [
"@nuxtjs-alt/auth",
"@nuxtjs-alt/http",
"@pinia/nuxt",
],
auth: {
strategies: {
localStorage: false,
discord: {
clientId: "CLIENT ID",
clientSecret: "CLIENT SECRET",
redirectUri: "REDIRECT URI",
},
},
},
});
index.vue:
<template>
<div class="hero">
<button @click="$auth.loginWith('discord')">Test</button>
</div>
</template>
dashboard.vue:
<template>
<div>
{{ $auth.loggedIn }}
</div>
</template>