diff --git a/api/http/handler/settings/settings_public.go b/api/http/handler/settings/settings_public.go index 800c43641..cc1e07854 100644 --- a/api/http/handler/settings/settings_public.go +++ b/api/http/handler/settings/settings_public.go @@ -33,8 +33,7 @@ func (handler *Handler) settingsPublic(w http.ResponseWriter, r *http.Request) * AllowPrivilegedModeForRegularUsers: settings.AllowPrivilegedModeForRegularUsers, EnableHostManagementFeatures: settings.EnableHostManagementFeatures, ExternalTemplates: false, - // TODO: check if state=portainer useful or not - OAuthLoginURI: fmt.Sprintf("%s?response_type=code&client_id=%s&redirect_uri=%s&scope=%s&state=portainer&prompt=login", + OAuthLoginURI: fmt.Sprintf("%s?response_type=code&client_id=%s&redirect_uri=%s&scope=%s&prompt=login", settings.OAuthSettings.AuthorizationURI, settings.OAuthSettings.ClientID, settings.OAuthSettings.RedirectURI, diff --git a/app/extensions/oauth/components/oauth-providers-selector/oauth-provider-selector-controller.js b/app/extensions/oauth/components/oauth-providers-selector/oauth-provider-selector-controller.js index 73721cb1c..1cb1155cc 100644 --- a/app/extensions/oauth/components/oauth-providers-selector/oauth-provider-selector-controller.js +++ b/app/extensions/oauth/components/oauth-providers-selector/oauth-provider-selector-controller.js @@ -40,7 +40,7 @@ angular.module('portainer.extensions.oauth') } else { ctrl.provider = ctrl.providers[0]; } - ctrl.onSelect(ctrl.provider); + ctrl.onSelect(ctrl.provider, false); } function getProviderByURL(providerAuthURL) { diff --git a/app/extensions/oauth/components/oauth-providers-selector/oauth-providers-selector.html b/app/extensions/oauth/components/oauth-providers-selector/oauth-providers-selector.html index 8422f0900..56023908e 100644 --- a/app/extensions/oauth/components/oauth-providers-selector/oauth-providers-selector.html +++ b/app/extensions/oauth/components/oauth-providers-selector/oauth-providers-selector.html @@ -5,7 +5,7 @@