Added basic auth and route protection

This commit is contained in:
2024-04-26 15:13:13 +01:00
parent aba3c335c4
commit ff4a77b4b4
8 changed files with 154 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
package main
import (
"context"
"embed"
"github.com/wailsapp/wails/v2"
@@ -14,6 +15,7 @@ var assets embed.FS
func main() {
// Create an instance of the app structure
app := NewApp()
auth := NewAuth()
// Create application with options
err := wails.Run(&options.App{
@@ -24,9 +26,13 @@ func main() {
Assets: assets,
},
BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 1},
OnStartup: app.startup,
OnStartup: func(ctx context.Context) {
app.startup(ctx)
auth.startup(ctx)
},
Bind: []interface{}{
app,
auth,
},
})