fixed auth
Build And Push Image / docker (push) Successful in 2m54s
Details
Build And Push Image / docker (push) Successful in 2m54s
Details
This commit is contained in:
parent
7d9f895ca6
commit
7b72d7a565
|
|
@ -1,6 +1,14 @@
|
||||||
export default defineNuxtPlugin(async () => {
|
export default defineNuxtPlugin(async () => {
|
||||||
const { checkAuth } = useAuth();
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
// Check authentication status on app startup
|
// Skip auth check on public pages
|
||||||
await checkAuth();
|
const publicPages = ['/login', '/signup', '/auth/callback', '/forgot-password'];
|
||||||
|
const isPublicPage = publicPages.some(page => route.path.startsWith(page));
|
||||||
|
|
||||||
|
if (!isPublicPage) {
|
||||||
|
const { checkAuth } = useAuth();
|
||||||
|
// Check authentication status on app startup for non-public pages
|
||||||
|
await checkAuth();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue