From a84fab188248744ed2de9058276aba44a2ee6f50 Mon Sep 17 00:00:00 2001 From: SrGooglo Date: Mon, 25 Mar 2024 14:06:17 +0100 Subject: [PATCH] added basic auth service --- src/main/auth.js | 5 +++++ src/main/index.js | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 src/main/auth.js diff --git a/src/main/auth.js b/src/main/auth.js new file mode 100644 index 0000000..5cd4294 --- /dev/null +++ b/src/main/auth.js @@ -0,0 +1,5 @@ +class AuthService { + authorizeFromUrl(url) { + console.log("authorizeFromUrl", url) + } +} \ No newline at end of file diff --git a/src/main/index.js b/src/main/index.js index a83a440..c1db6a2 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -32,6 +32,8 @@ class ElectronApp { this.win = null } + authService = new AuthService() + handlers = { "pkg:list": async () => { return await this.pkgManager.getInstalledPackages() @@ -168,6 +170,9 @@ class ElectronApp { case "install": { return sendToRender("installation:invoked", value) } + case "authorize": { + return authService.authorizeFromUrl(url) + } default: { return sendToRender("new:message", { message: "Unrecognized URL action"