File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
met-web/src/services/userService Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ const KeycloakData = _kc;
2222 * Initializes Keycloak instance.
2323 */
2424const initKeycloak = async ( dispatch : Dispatch < AnyAction > ) => {
25- if ( KeycloakData . authenticated !== undefined ) {
25+ console . log ( '[Keycloak] Starting initialization' ) ;
26+ if ( KeycloakData . authenticated === true || KeycloakData . authenticated === false ) {
27+ console . log ( '[Keycloak] Already initialized' ) ;
2628 return ;
2729 }
2830 try {
@@ -68,7 +70,7 @@ const initKeycloak = async (dispatch: Dispatch<AnyAction>) => {
6870 dispatch ( userAuthentication ( KeycloakData . authenticated ? true : false ) ) ;
6971 refreshToken ( dispatch ) ;
7072 } catch ( err ) {
71- console . error ( 'Keycloak initialization error:' , err ) ;
73+ console . error ( '[Keycloak] Keycloak initialization error:' , err ) ;
7274 dispatch ( userAuthentication ( false ) ) ;
7375 }
7476} ;
You can’t perform that action at this time.
0 commit comments