From c4bbc029813153a0d3b07f601610272eabe1abf4 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Sun, 6 Aug 2023 12:51:10 +0300 Subject: [PATCH] added btoa --- .../authentication/confirm-login/confirm-login.component.ts | 4 ++-- Mohem/src/app/authentication/login/login.component.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts index fee84407..c9a19c60 100644 --- a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts +++ b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts @@ -438,9 +438,9 @@ export class ConfirmLoginComponent implements OnInit { private checkUserAuthentication() { this.cs.startLoading(); const request = new LoginRequest(); - request.P_USER_NAME = this.username; + request.P_USER_NAME = btoa(this.username); request.P_LANGUAGE = 'US'; // this.language; - request.P_PASSWORD = localStorage.getItem('password'); + request.P_PASSWORD = btoa(localStorage.getItem('password')); this.authService .login(request, () => { console.log('error here'); diff --git a/Mohem/src/app/authentication/login/login.component.ts b/Mohem/src/app/authentication/login/login.component.ts index 8677a7bb..c1615681 100644 --- a/Mohem/src/app/authentication/login/login.component.ts +++ b/Mohem/src/app/authentication/login/login.component.ts @@ -253,9 +253,9 @@ export class LoginComponent implements OnInit, OnDestroy { private checkUserAuthentication() { this.cs.startLoading(); const request = new LoginRequest(); - request.P_USER_NAME = this.username; + request.P_USER_NAME = btoa(this.username); request.P_LANGUAGE = this.language; - request.P_PASSWORD = this.password; + request.P_PASSWORD = btoa(this.password); console.log(request); this.authService .login(request, () => {