Open geofany opened 1 week ago
Darwin
v20.17.0
3.13.1
2.9.7
yarn@1.22.22
-
auth
build
compatibilityDate
css
devtools
i18n
imports
modules
runtimeConfig
vite
@nuxtjs/i18n@8.5.2
@pinia/nuxt@0.5.4
pinia-plugin-persistedstate/nuxt
@sidebase/nuxt-auth@0.9.2
()
auth: { baseURL: `${process.env.BASE_URL}/api/v1/authentication/`, globalAppMiddleware: true, provider: { type: "local", token: { maxAgeInSeconds: 60 * 60 * 24, signInResponseTokenPointer: "/data/access_token", }, pages: { login: "/", }, refresh: { isEnabled: true, refreshOnlyToken: false, endpoint: { path: "refresh", method: "post", }, token: { signInResponseRefreshTokenPointer: "/data/refresh_token", refreshRequestTokenPointer: "/refreshToken", }, }, endpoints: { signIn: { path: "login", method: "post" }, signOut: { path: "logout", method: "post" }, signUp: { path: "register", method: "post" }, getSession: { path: "validate", method: "post" }, }, }, },
how can i trigger signOut automatically when refresh got no response. without need to Reload the Page i already use watcher to check token, and status but not work
watch(status, (newVal) => { if(newVal === 'unauthenticated') { console.log("Logout") } else { console.log(newVal) } })
No response
Environment
Darwin
v20.17.0
3.13.1
3.13.1
2.9.7
yarn@1.22.22
-
auth
,build
,compatibilityDate
,css
,devtools
,i18n
,imports
,modules
,runtimeConfig
,vite
@nuxtjs/i18n@8.5.2
,@pinia/nuxt@0.5.4
,pinia-plugin-persistedstate/nuxt
,@sidebase/nuxt-auth@0.9.2
,()
-
Reproduction
-
Describe the bug
how can i trigger signOut automatically when refresh got no response. without need to Reload the Page i already use watcher to check token, and status but not work
Additional context
No response
Logs
No response