feat: Implement authentication system with token refresh and initial instructor dashboard with course management.
This commit is contained in:
parent
0eb9b522f6
commit
ab3124628c
11 changed files with 1053 additions and 93 deletions
|
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue