diff --git a/src/components/users/change-password/ko/runtime/change-password.ts b/src/components/users/change-password/ko/runtime/change-password.ts index 2558b96bd..60adb7d10 100644 --- a/src/components/users/change-password/ko/runtime/change-password.ts +++ b/src/components/users/change-password/ko/runtime/change-password.ts @@ -113,7 +113,7 @@ export class ChangePassword { } const user = await this.usersService.getCurrentUser(); - const credentials = `Basic ${btoa(`${user.email}:${this.password()}`)}`; + const credentials = `Basic ${Buffer.from(`${user.email}:${this.password()}`, "utf8").toString("base64")}`; let userId = await this.usersService.authenticate(credentials); if (!userId) { diff --git a/src/services/usersService.ts b/src/services/usersService.ts index f371e0eec..bb18faf8c 100644 --- a/src/services/usersService.ts +++ b/src/services/usersService.ts @@ -33,7 +33,7 @@ export class UsersService { * @param password {string} Password. */ public async signInWithBasic(username: string, password: string): Promise { - const credentials = `Basic ${btoa(`${username}:${password}`)}`; + const credentials = `Basic ${Buffer.from(`${username}:${password}`, "utf8").toString("base64")}`; const userId = await this.authenticate(credentials); if (userId) {