Single Sign-On
A minimal app with the standard systems. Single sign-on is configured at runtime: in the admin center, the user settings take the URL of a Nago Login Service (NLS), an allow list of email patterns and the default roles and groups of new SSO users.

package main
import (
"time"
"github.com/worldiety/option"
"go.wdy.de/nago/application"
cfginspector "go.wdy.de/nago/application/inspector/cfg"
cfglocalization "go.wdy.de/nago/application/localization/cfg"
"go.wdy.de/nago/presentation/core"
"go.wdy.de/nago/presentation/ui"
"go.wdy.de/nago/web/vuejs"
)
func main() {
application.Configure(func(cfg *application.Configurator) {
cfg.SetApplicationID("de.worldiety.tutorial_75")
cfg.Serve(vuejs.Dist())
option.MustZero(cfg.StandardSystems())
option.Must(option.Must(cfg.UserManagement()).UseCases.EnableBootstrapAdmin(time.Now().Add(time.Hour), "%6UbRsCuM8N$auy"))
cfg.SetDecorator(cfg.NewScaffold().Decorator())
option.Must(cfginspector.Enable(cfg))
option.Must(cfglocalization.Enable(cfg))
cfg.RootViewWithDecoration(".", func(wnd core.Window) core.View {
return ui.VStack(
ui.Text("hello world!"),
).FullWidth()
})
}).Run()
}
View on GitHub ↗
· run it with go run go.wdy.de/nago/example/cmd/tutorial-75-sso@latest