Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 11601

Nuxt 3 @sidebase/nuxt-auth module - local provider does not persist auth status after login

$
0
0

I have created nuxt 3 app with @sidebase/nuxt-auth@0.6.7 for authentication.It was able to connect to backend api(.NET) /login and /user-info sucessfully but when redirect after login, still redirect back to /login page.

I tried to prevent redirect after login using await signIn({user_name: 'test', password: 'user'}, { redirect: false }); and when I logged useAuth(), status is "authenticated" and token has value.

auth configuration in nuxt.config.ts

auth: {        globalAppMiddleware: true,        baseURL: process.env.API_BASE_URL,        provider: {            type: 'local',            pages: { login: '/login' },            endpoints: {                signIn: { path: '/login', method: 'post' },                signOut: false,                getSession: { path: '/user-profile', method: 'get' }            }        }    }

Viewing all articles
Browse latest Browse all 11601

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>