diff --git a/src/app/core/authentication/authentication.service.ts b/src/app/core/authentication/authentication.service.ts index 41b588d24..bb6385608 100644 --- a/src/app/core/authentication/authentication.service.ts +++ b/src/app/core/authentication/authentication.service.ts @@ -88,10 +88,8 @@ export class AuthenticationService { this.rememberMe = loginContext.remember; this.storage = this.rememberMe ? localStorage : sessionStorage; - let httpParams = new HttpParams(); - httpParams = httpParams.set('username', loginContext.username); - httpParams = httpParams.set('password', loginContext.password); if (environment.oauth.enabled) { + let httpParams = new HttpParams(); httpParams = httpParams.set('client_id', 'community-app'); httpParams = httpParams.set('grant_type', 'password'); httpParams = httpParams.set('client_secret', '123'); @@ -103,7 +101,7 @@ export class AuthenticationService { }) ); } else { - return this.http.post('/authentication', {}, { params: httpParams }) + return this.http.post('/authentication', { username: loginContext.username, password: loginContext.password }) .pipe( map((credentials: Credentials) => { this.onLoginSuccess(credentials);