File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ export class DsoRedirectService {
108108 }
109109 }
110110 }
111- // Redirect to login page if the user is not authenticated to see the requested page
111+ // Handle authentication errors: redirect unauthenticated users to login, authenticated users to forbidden page
112112 if ( response . hasFailed && ( response . statusCode === 401 || response . statusCode === 403 ) ) {
113113 const isAuthenticated$ = this . authService . isAuthenticated ( ) ;
114114 isAuthenticated$
@@ -119,10 +119,10 @@ export class DsoRedirectService {
119119 // Extract redirect URL - remove `https://.../namespace` from the current URL. Keep only `handle/...`
120120 const redirectUrl = this . extractHandlePath ( window . location . href ) ;
121121 this . authService . setRedirectUrl ( redirectUrl ) ;
122- this . router . navigateByUrl ( 'login' ) ;
122+ void this . router . navigateByUrl ( 'login' ) ;
123123 } else {
124124 // If the user is authenticated but still has no access, redirect to forbidden page
125- this . router . navigateByUrl ( getForbiddenRoute ( ) ) ;
125+ void this . router . navigateByUrl ( getForbiddenRoute ( ) ) ;
126126 }
127127 } ) ;
128128 }
You can’t perform that action at this time.
0 commit comments