diff --git a/handlers/login.go b/handlers/login.go index dda3f77..332f7d6 100644 --- a/handlers/login.go +++ b/handlers/login.go @@ -73,8 +73,8 @@ func Login(rw http.ResponseWriter, req *http.Request) { return } - if playground.AuthRedirectURL != "" { - provider.RedirectURL = playground.AuthRedirectURL + if playground.AuthRedirectBase != "" { + provider.RedirectURL = fmt.Sprintf("%s/oauth/providers/%s/callback", playground.AuthRedirectBase, providerName) } else { scheme := "http" if req.TLS != nil { diff --git a/pwd/types/playground.go b/pwd/types/playground.go index bb24252..271c1df 100644 --- a/pwd/types/playground.go +++ b/pwd/types/playground.go @@ -88,7 +88,7 @@ type Playground struct { GoogleClientSecret string `json:"google_client_secret" bson:"google_client_secret"` DockerClientID string `json:"docker_client_id" bson:"docker_client_id"` DockerClientSecret string `json:"docker_client_secret" bson:"docker_client_secret"` - AuthRedirectURL string `json:"auth_redirect_url" bson:"auth_redirect_url"` + AuthRedirectBase string `json:"auth_redirect_base" bson:"auth_redirect_base"` DockerHost string `json:"docker_host" bson:"docker_host"` MaxInstances int `json:"max_instances" bson:"max_instances"` Privileged bool `json:"privileged" bson:"privileged"`