@@ -134,8 +134,7 @@ function initRouter() {
134134 }
135135 } ,
136136 '/reset-password' : {
137- view : ( ) => loadPage ( '/views/reset-password.html' ) ,
138- afterRender : ( ) => initResetPasswordPage ( )
137+ view : ( ) => loadPage ( '/views/reset-password.html' )
139138 } ,
140139 '/state-demo' : {
141140 view : ( ) => loadPage ( '/views/state-demo.html' )
@@ -1294,35 +1293,6 @@ function initSubscriptionPage() {
12941293 } ) ;
12951294}
12961295
1297- /**
1298- * Initialize reset password page
1299- */
1300- async function initResetPasswordPage ( ) {
1301- try {
1302- // Import auth status utility
1303- const { checkAuthStatus } = await import ( './utils/auth-status.js' ) ;
1304-
1305- // Check auth status with the server
1306- const status = await checkAuthStatus ( ) ;
1307-
1308- if ( ! status . authenticated ) {
1309- console . log ( 'Not authenticated, redirecting to login page:' , status . message ) ;
1310- window . router . navigate ( '/login' ) ;
1311- return ;
1312- }
1313-
1314- console . log ( 'Authentication verified with server' ) ;
1315- } catch ( error ) {
1316- console . error ( 'Error checking authentication status:' , error ) ;
1317- window . router . navigate ( '/login' ) ;
1318- return ;
1319- }
1320-
1321- console . log ( 'JWT token found, initializing reset password page' ) ;
1322-
1323- // The reset password form is handled by the inline script in the HTML file
1324- }
1325-
13261296// Expose functions globally
13271297window . app = window . app || { } ;
13281298Object . assign ( window . app , {
0 commit comments