I'm very new to both nuxt and auth0. I'm using auth0 with my nuxt app and I have written a piece of code in my main pages mounted hook that enables me to login to the server when I use $auth.login()
then it returns me to my app and gives me a token in the url. I can get my user profile's info using the token with /auth/me
in my mounted hook but when I log $auth.$state
it says you're not logged in:
loggedIn: false strategy: "auth0" user: null
How can I use $auth
object with my auth0
code? This is my nuxt.config.js
:
auth: { redirect: { login: '/', callback: '/auth/signed-in' }, strategies: { local: false, auth0: { domain: process.env.AUTH0_DOMAIN, client_id: process.env.AUTH0_CLIENT_ID, } } },
https://stackoverflow.com/questions/66809642/auth-object-is-empty-eventhough-my-nuxt-app-is-logged-in March 26, 2021 at 09:04AM
没有评论:
发表评论