diff --git a/package-lock.json b/package-lock.json index 229bb639888..f6cb96d9009 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8659,9 +8659,9 @@ } }, "node_modules/@tsconfig/node10": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.12.tgz", - "integrity": "sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.13.tgz", + "integrity": "sha512-gcLdvR9HO1ZJBypsOGqaP6TFEzb6vIta0KSTLt9NAQ6pXQO3cRgSVyCN6pzYqI9DlJgY71XKO0dpDhCf08b3pg==", "dev": true, "license": "MIT", "optional": true, @@ -9447,9 +9447,9 @@ } }, "node_modules/acorn-walk/node_modules/acorn": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", - "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", + "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", "dev": true, "license": "MIT", "optional": true, @@ -16168,9 +16168,9 @@ } }, "node_modules/gulp-postcss/node_modules/acorn": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", - "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", + "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", "dev": true, "license": "MIT", "optional": true, diff --git a/src/app/login/login-home/login-home.component.spec.ts b/src/app/login/login-home/login-home.component.spec.ts index 5e1870b21e1..4bf1c26f9e7 100644 --- a/src/app/login/login-home/login-home.component.spec.ts +++ b/src/app/login/login-home/login-home.component.spec.ts @@ -57,7 +57,7 @@ function getRedirectUrl() { describe('getRedirectUrl()', () => { it('should add redirectUrl to Google login url', () => { expect(component.getRedirectUrl('google')).toEqual( - `${contextPath}/api/google-login?redirectUrl=${redirectUrl}` + `/oauth2/authorization/google?redirectUrl=/wise/api/j_acegi_security_check` ); }); }); diff --git a/src/app/login/login-home/login-home.component.ts b/src/app/login/login-home/login-home.component.ts index 6412e298f5a..a285851647b 100644 --- a/src/app/login/login-home/login-home.component.ts +++ b/src/app/login/login-home/login-home.component.ts @@ -121,9 +121,9 @@ export class LoginHomeComponent implements OnInit { getRedirectUrl(social: string): string { let redirectUrl = ''; if (social === 'google') { - redirectUrl = `${this.configService.getContextPath()}/api/google-login?redirectUrl=${this.userService.getRedirectUrl()}`; + redirectUrl = `/oauth2/authorization/google?redirectUrl=${this.userService.getRedirectUrl()}`; } else if (social === 'microsoft') { - redirectUrl = `/api/microsoft-login?redirectUrl=/`; + redirectUrl = `/oauth2/authorization/microsoft?redirectUrl=${this.userService.getRedirectUrl()}`; } else { redirectUrl = this.userService.getRedirectUrl(); } diff --git a/src/app/register/abstract-register-user.component.ts b/src/app/register/abstract-register-user.component.ts index dd03d70719c..af1df1ec0cf 100644 --- a/src/app/register/abstract-register-user.component.ts +++ b/src/app/register/abstract-register-user.component.ts @@ -44,7 +44,7 @@ export abstract class AbstractRegisterUserComponent implements OnInit { } protected microsoftSignIn(): void { - window.location.href = `/api/microsoft-login?redirectUrl=${this.joinFormPath}`; + window.location.href = `/oauth2/authorization/microsoft?redirectUrl=${this.joinFormPath}`; } protected abstract getFormParams(): any; diff --git a/src/app/register/register-google-user-already-exists/register-google-user-already-exists.component.ts b/src/app/register/register-google-user-already-exists/register-google-user-already-exists.component.ts index 9ecd557d174..ebbb2768037 100644 --- a/src/app/register/register-google-user-already-exists/register-google-user-already-exists.component.ts +++ b/src/app/register/register-google-user-already-exists/register-google-user-already-exists.component.ts @@ -13,6 +13,6 @@ export class RegisterGoogleUserAlreadyExistsComponent { constructor(private configService: ConfigService) {} public socialSignIn(socialPlatform: string) { - window.location.href = `${this.configService.getContextPath()}/api/google-login`; + window.location.href = `${this.configService.getContextPath()}/oauth2/authorization/google`; } } diff --git a/src/app/register/register-microsoft-user-already-exists/register-microsoft-user-already-exists.component.ts b/src/app/register/register-microsoft-user-already-exists/register-microsoft-user-already-exists.component.ts index 2d060cca007..452d3488d94 100644 --- a/src/app/register/register-microsoft-user-already-exists/register-microsoft-user-already-exists.component.ts +++ b/src/app/register/register-microsoft-user-already-exists/register-microsoft-user-already-exists.component.ts @@ -8,6 +8,6 @@ import { MatButton } from '@angular/material/button'; }) export class RegisterMicrosoftUserAlreadyExistsComponent { protected login(): void { - window.location.href = `/api/microsoft-login?redirectUrl=/`; + window.location.href = `/oauth2/authorization/microsoft`; } } diff --git a/src/app/register/register-user-complete.component.ts b/src/app/register/register-user-complete.component.ts index 18b8472f18a..ff2802a4859 100644 --- a/src/app/register/register-user-complete.component.ts +++ b/src/app/register/register-user-complete.component.ts @@ -4,8 +4,8 @@ import { ConfigService } from '../services/config.service'; @Directive() export abstract class RegisterUserCompleteComponent implements OnInit { - protected googleLogInURL = `${this.configService.getContextPath()}/api/google-login`; - protected microsoftLogInURL = `${this.configService.getContextPath()}/api/microsoft-login?redirectUrl=/`; + protected googleLogInURL = `${this.configService.getContextPath()}/oauth2/authorization/google`; + protected microsoftLogInURL = `${this.configService.getContextPath()}/oauth2/authorization/microsoft`; protected socialAccount: boolean; protected isUsingGoogleId: boolean; protected isUsingMicrosoftId: boolean;