feat: add support for auto redirecting to oauth providers

This commit is contained in:
Stavros
2025-05-01 14:18:26 +03:00
parent 83483d6374
commit 773942dc3b
11 changed files with 129 additions and 27 deletions

View File

@@ -26,6 +26,7 @@ type Config struct {
GenericName string `mapstructure:"generic-name"`
DisableContinue bool `mapstructure:"disable-continue"`
OAuthWhitelist string `mapstructure:"oauth-whitelist"`
OAuthAutoRedirect string `mapstructure:"oauth-auto-redirect" validate:"oneof=none github google generic"`
SessionExpiry int `mapstructure:"session-expiry"`
LogLevel int8 `mapstructure:"log-level" validate:"min=-1,max=5"`
Title string `mapstructure:"app-title"`
@@ -44,6 +45,7 @@ type HandlersConfig struct {
GenericName string
Title string
ForgotPasswordMessage string
OAuthAutoRedirect string
}
// OAuthConfig is the configuration for the providers