File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -232,12 +232,12 @@ router.beforeEach(async (to) => {
232232
233233 // Automatically login using mock when in development mode
234234 if ( import . meta. env . VITE_NODE_ENV === 'development' && ! authenticated ) {
235+ console . info ( 'Backoffice is in development mode: mocking auth...' ) ;
235236 await authStore . MockLogin ( {
236237 id : 'dev' ,
237238 name : 'dev' ,
238239 roles : [ SecurityGroup . ADMIN ] ,
239240 } ) ;
240- await authStore . initStores ( ) ;
241241 }
242242
243243 // Check if user still has valid cookies - ignore if specific request to /auth
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ export const useAuthStore = defineStore('auth', {
6868 this . roles = user . data . roles ;
6969 this . securityGroups = securityGroups . data ;
7070 this . authenticating = false ;
71+
72+ await this . initStores ( ) ;
7173 return true ;
7274 } ,
7375 /**
@@ -116,6 +118,8 @@ export const useAuthStore = defineStore('auth', {
116118 this . name = user . data . name ;
117119 this . roles = user . data . roles ;
118120 this . securityGroups = securityGroups . data ;
121+
122+ await this . initStores ( ) ;
119123 return true ;
120124 } ,
121125 /**
You can’t perform that action at this time.
0 commit comments