mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 02:03:39 +00:00
[PM-3677] Remove ipcRenderer from desktop utils (#6477)
* [PM-3677] Remove ipcRenderer from utils * Fix typo
This commit is contained in:
@@ -8,8 +8,6 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
||||
|
||||
import { getCookie } from "../utils";
|
||||
|
||||
const BroadcasterSubscriptionId = "AccessibilityCookieComponent";
|
||||
|
||||
@Component({
|
||||
@@ -55,7 +53,7 @@ export class AccessibilityCookieComponent {
|
||||
|
||||
async checkForCookie() {
|
||||
this.hCaptchaWindow.close();
|
||||
const [cookie] = await getCookie("https://www.hcaptcha.com/", "hc_accessibility");
|
||||
const [cookie] = await ipc.auth.getHcaptchaAccessibilityCookie();
|
||||
if (cookie) {
|
||||
this.onCookieSavedSuccess();
|
||||
} else {
|
||||
|
||||
6
apps/desktop/src/auth/preload.ts
Normal file
6
apps/desktop/src/auth/preload.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { ipcRenderer } from "electron";
|
||||
|
||||
export default {
|
||||
getHcaptchaAccessibilityCookie: (): Promise<[string]> =>
|
||||
ipcRenderer.invoke("getCookie", { url: "https://www.hcaptcha.com/", name: "hc_accessibility" }),
|
||||
};
|
||||
Reference in New Issue
Block a user