feat: Implement authentication system with token refresh and initial instructor dashboard with course management.

This commit is contained in:
Missez 2026-01-23 09:53:39 +07:00
parent 0eb9b522f6
commit ab3124628c
11 changed files with 1053 additions and 93 deletions

View file

@ -1,11 +1,11 @@
export default defineNuxtPlugin({
name: 'auth-restore',
parallel: false,
setup() {
async setup() {
const authStore = useAuthStore();
// Restore auth state from cookies on app initialization
// useCookie works on both server and client
authStore.checkAuth();
// Now async - will attempt to refresh token if needed
await authStore.checkAuth();
}
});