From c80df04f90872ee460ab1bbda260c7ff83f46deb Mon Sep 17 00:00:00 2001 From: Eneko Date: Fri, 23 Apr 2021 02:33:50 +0200 Subject: [PATCH] URLs pointed to new development environment --- src/app/auth/auth-config.module.ts | 3 +-- src/app/services/chat.service.ts | 6 +++--- src/app/views/chat/chat.component.html | 2 ++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/app/auth/auth-config.module.ts b/src/app/auth/auth-config.module.ts index cdafdce..41434d5 100644 --- a/src/app/auth/auth-config.module.ts +++ b/src/app/auth/auth-config.module.ts @@ -7,7 +7,6 @@ export function configureAuth(oidcConfigService: OidcConfigService): () => Promi return () => oidcConfigService.withConfig({ stsServer: 'http://localhost:8080/auth/realms/okupamicoche', - // stsServer: 'https://auth.fosil.eu/auth/realms/test', redirectUrl: window.location.origin, postLogoutRedirectUri: window.location.origin, clientId: 'okupamicoche-frontend-angular', @@ -18,7 +17,7 @@ export function configureAuth(oidcConfigService: OidcConfigService): () => Promi silentRenewUrl: `${window.location.origin}/silent-renew.html`, renewTimeBeforeTokenExpiresInSeconds: 30, tokenRefreshInSeconds: 20, - ignoreNonceAfterRefresh: true, // El refresh token está fallando si no se ignora el Nonce + ignoreNonceAfterRefresh: true, // Keycloak's refresh token fails if Nonce is not ignored secureRoutes: [TRAVEL_API_URL, USER_API_URL], storage: localStorage, logLevel: LogLevel.Warn diff --git a/src/app/services/chat.service.ts b/src/app/services/chat.service.ts index 60e6ae5..58eee33 100644 --- a/src/app/services/chat.service.ts +++ b/src/app/services/chat.service.ts @@ -24,7 +24,7 @@ export class ChatService { ) { } goToSsoLogin(): void { - window.location.href = 'http://synapse:8008/_matrix/client/r0/login/sso/redirect?redirectUrl=http://localhost:4200/'; + window.location.href = 'http://okupamicoche-synapse:8008/_matrix/client/r0/login/sso/redirect?redirectUrl=http://localhost:4200/'; } login(loginToken: string): Promise { @@ -86,7 +86,7 @@ export class ChatService { private async loginWithToken(loginToken: string): Promise { const matrixLogin = await this.http.post( - 'http://synapse:8008/_matrix/client/r0/login', + 'http://okupamicoche-synapse:8008/_matrix/client/r0/login', { initial_device_display_name: 'Okupa mi coche', token: loginToken, @@ -96,7 +96,7 @@ export class ChatService { console.log('LOGGED TO CHAT'); console.log({ matrixLogin }); this.matrixClient = matrix.createClient({ - baseUrl: 'http://localhost:8008', + baseUrl: 'http://okupamicoche-synapse:8008', accessToken: matrixLogin.access_token, userId: matrixLogin.user_id }); diff --git a/src/app/views/chat/chat.component.html b/src/app/views/chat/chat.component.html index eb3eda6..fa17881 100644 --- a/src/app/views/chat/chat.component.html +++ b/src/app/views/chat/chat.component.html @@ -1,11 +1,13 @@

Login for seeing the chat.

+ +