diff --git a/src/app/auth/auth-config.module.ts b/src/app/auth/auth-config.module.ts index f36c4e7..8346827 100644 --- a/src/app/auth/auth-config.module.ts +++ b/src/app/auth/auth-config.module.ts @@ -6,15 +6,15 @@ import { TRAVEL_API_URL, USER_API_URL } from '../app.config'; export function configureAuth(oidcConfigService: OidcConfigService): () => Promise { return () => oidcConfigService.withConfig({ - stsServer: 'https://okupamicoche-keycloak:8443/auth/realms/okupamicoche', + stsServer: 'http://okupamicoche-keycloak:8080/auth/realms/okupamicoche', + // stsServer: 'https://okupamicoche-keycloak:8443/auth/realms/okupamicoche', redirectUrl: window.location.origin, postLogoutRedirectUri: window.location.origin, clientId: 'okupamicoche-frontend-angular', scope: 'openid profile', responseType: 'code', silentRenew: true, - // useRefreshToken: true, - silentRenewUrl: `${window.location.origin}/silent-renew.html`, + useRefreshToken: true, renewTimeBeforeTokenExpiresInSeconds: 30, tokenRefreshInSeconds: 20, ignoreNonceAfterRefresh: true, // Keycloak's refresh token fails if Nonce is not ignored diff --git a/src/app/services/chat.service.ts b/src/app/services/chat.service.ts index bea9fe5..246f627 100644 --- a/src/app/services/chat.service.ts +++ b/src/app/services/chat.service.ts @@ -114,13 +114,13 @@ export class ChatService { await this.matrixClient.startClient({ initialSyncLimit: 100 }); - // this.matrixClient.once('sync', (state: string, prevState: string, _: any) => { - // if (state === 'PREPARED') { - // console.log('CHAT SYNC FINISHED'); - // } else { - // console.log('MATRIX CLIENT STATE CHANGED state=' + state); - // } - // }); + this.matrixClient.once('sync', (state: string, prevState: string, _: any) => { + if (state === 'PREPARED') { + console.log('CHAT SYNC FINISHED'); + } else { + console.log('MATRIX CLIENT STATE CHANGED state=' + state); + } + }); return this.matrixClient; } diff --git a/src/silent-renew.html b/src/silent-renew.html deleted file mode 100644 index c12ec2b..0000000 --- a/src/silent-renew.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - silent-renew - - - - - - \ No newline at end of file