mirror of
https://github.com/ragestudio/relic.git
synced 2025-06-09 10:34:18 +00:00
added basic auth service
This commit is contained in:
parent
3ae13ccc61
commit
a84fab1882
5
src/main/auth.js
Normal file
5
src/main/auth.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
class AuthService {
|
||||||
|
authorizeFromUrl(url) {
|
||||||
|
console.log("authorizeFromUrl", url)
|
||||||
|
}
|
||||||
|
}
|
@ -32,6 +32,8 @@ class ElectronApp {
|
|||||||
this.win = null
|
this.win = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
authService = new AuthService()
|
||||||
|
|
||||||
handlers = {
|
handlers = {
|
||||||
"pkg:list": async () => {
|
"pkg:list": async () => {
|
||||||
return await this.pkgManager.getInstalledPackages()
|
return await this.pkgManager.getInstalledPackages()
|
||||||
@ -168,6 +170,9 @@ class ElectronApp {
|
|||||||
case "install": {
|
case "install": {
|
||||||
return sendToRender("installation:invoked", value)
|
return sendToRender("installation:invoked", value)
|
||||||
}
|
}
|
||||||
|
case "authorize": {
|
||||||
|
return authService.authorizeFromUrl(url)
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
return sendToRender("new:message", {
|
return sendToRender("new:message", {
|
||||||
message: "Unrecognized URL action"
|
message: "Unrecognized URL action"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user