diff --git a/README.md b/README.md index e47598a..6902173 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -# SampleOauth +# Okupa mi coche - Frontend Angular +Gestión de viajes en el valle. This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.2.1. diff --git a/src/app/auth.config.ts b/src/app/auth.config.ts index be83559..f146481 100644 --- a/src/app/auth.config.ts +++ b/src/app/auth.config.ts @@ -2,8 +2,8 @@ import { AuthConfig } from 'angular-oauth2-oidc'; import { useSilentRefreshForCodeFlow } from '../flags'; export const authConfig: AuthConfig = { - issuer: 'http://localhost:8081/auth/realms/fosil', - // issuer: 'https://auth.fosil.eu/auth/realms/fosil', + // issuer: 'http://localhost:8081/auth/realms/fosil', + issuer: 'https://auth.fosil.eu/auth/realms/test', // URL of the SPA to redirect the user to after login redirectUri: diff --git a/src/app/services/chat.service.ts b/src/app/services/chat.service.ts index ccb4dfe..9e6ad08 100644 --- a/src/app/services/chat.service.ts +++ b/src/app/services/chat.service.ts @@ -12,7 +12,7 @@ export class ChatService { ) { } goToSsoLogin(): void { - window.location.href = 'https://matrix.fosil.eu/_matrix/client/r0/login/sso/redirect?redirectUrl=http://localhost:4200/'; + window.location.href = 'http://synapse:8008/_matrix/client/r0/login/sso/redirect?redirectUrl=http://localhost:4200/'; } login(loginToken: string): Promise { @@ -21,7 +21,7 @@ export class ChatService { // console.log('SDK'); // console.log(sdk); return this.http.post( - 'https://matrix.fosil.eu/_matrix/client/r0/login', + 'http://synapse:8008/_matrix/client/r0/login', { initial_device_display_name: 'Okupa mi coche', token: loginToken, @@ -32,7 +32,7 @@ export class ChatService { console.log(res); const client = matrixcs.createClient({ - baseUrl: "https://matrix.fosil.eu", + baseUrl: "http://localhost:8008", accessToken: res.access_token, userId: res.user_id });