File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -37,10 +37,8 @@ setupConsoleLogging();
3737async function init ( ) {
3838 console . info ( 'Context:' , IS_EMBEDDED ? 'iframe' : 'standalone' ) ;
3939
40- const authenticated = await AuthService . init ( getRealmParam ( ) ?? 'master' ) ;
41- if ( ! authenticated ) {
42- AuthService . login ( ) ;
43- }
40+ await AuthService . init ( getRealmParam ( ) ?? 'master' ) ;
41+
4442 // Setup OR icons
4543 setupORIcons ( ) ;
4644
Original file line number Diff line number Diff line change @@ -34,9 +34,9 @@ export class AppLayout extends LitElement {
3434 realm = '' ;
3535
3636 // Called before the initial Vaadin Router location is entered ('/'), only called once since its a parent route
37- onBeforeEnter ( location : RouterLocation ) {
37+ async onBeforeEnter ( location : RouterLocation ) {
3838 if ( ! AuthService . authenticated ) {
39- AuthService . login ( ) ;
39+ await AuthService . login ( ) ;
4040 return ;
4141 }
4242
Original file line number Diff line number Diff line change @@ -95,15 +95,15 @@ class AuthServiceClass {
9595 /**
9696 * Login to the Keycloak instance
9797 */
98- login ( ) {
99- this . keycloak ?. login ( ) ;
98+ async login ( ) {
99+ await this . keycloak ?. login ( ) ;
100100 }
101101
102102 /**
103103 * Logout from the Keycloak instance
104104 */
105- logout ( ) {
106- this . keycloak ?. logout ( ) ;
105+ async logout ( ) {
106+ await this . keycloak ?. logout ( ) ;
107107 this . stopUpdateTokenInterval ( ) ;
108108 }
109109
You can’t perform that action at this time.
0 commit comments