diff --git a/server/server_test.go b/server/server_test.go index a8c7d227c3303..42719270f4f92 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -624,7 +624,7 @@ func getTestServer(t *testing.T, anonymousEnabled bool, withFakeSSO bool, useDex }) oidcServer := ts if !useDexForSSO { - oidcServer = testutil.GetOIDCTestServer(t) + oidcServer = testutil.GetOIDCTestServer(t, nil) } if withFakeSSO { cm.Data["url"] = ts.URL diff --git a/ui/package.json b/ui/package.json index 7b903964907c5..9f345b3c7c0bd 100644 --- a/ui/package.json +++ b/ui/package.json @@ -31,7 +31,6 @@ "minimatch": "^3.1.2", "moment": "^2.29.4", "monaco-editor": "^0.33.0", - "oauth4webapi": "^2.3.0", "path": "^0.12.7", "prop-types": "^15.8.1", "react": "^16.9.3", diff --git a/ui/src/app/app.tsx b/ui/src/app/app.tsx index 17851489dd610..40d6355d8e169 100644 --- a/ui/src/app/app.tsx +++ b/ui/src/app/app.tsx @@ -1,4 +1,4 @@ -import {DataLoader, NavigationManager, NotificationType, Notifications, NotificationsManager, PageContext, Popup, PopupManager, PopupProps} from 'argo-ui'; +import {DataLoader, NavigationManager, Notifications, NotificationsManager, PageContext, Popup, PopupManager, PopupProps} from 'argo-ui'; import {createBrowserHistory} from 'history'; import * as PropTypes from 'prop-types'; import * as React from 'react'; @@ -19,8 +19,6 @@ import {hashCode} from './shared/utils'; import {Banner} from './ui-banner/ui-banner'; import userInfo from './user-info'; import {AuthSettings} from './shared/models'; -import {PKCEVerification} from './login/components/pkce-verify'; -import {getPKCERedirectURI, pkceLogin} from './login/components/utils'; import {SystemLevelExtension} from './shared/services/extensions-service'; services.viewPreferences.init(); @@ -36,8 +34,7 @@ const routes: Routes = { '/applications': {component: applications.component}, '/settings': {component: settings.component}, '/user-info': {component: userInfo.component}, - '/help': {component: help.component}, - '/pkce/verify': {component: PKCEVerification, noLayout: true} + '/help': {component: help.component} }; interface NavItem { @@ -254,18 +251,7 @@ export class App extends React.Component< // If basehref is the default `/` it will become an empty string. const basehref = document.querySelector('head > base').getAttribute('href').replace(/\/$/, ''); if (isSSO) { - const authSettings = await services.authService.settings(); - - if (authSettings?.oidcConfig?.enablePKCEAuthentication) { - pkceLogin(authSettings.oidcConfig, getPKCERedirectURI().toString()).catch(err => { - this.getChildContext().apis.notifications.show({ - type: NotificationType.Error, - content: err?.message || JSON.stringify(err) - }); - }); - } else { - window.location.href = `${basehref}/auth/login?return_url=${encodeURIComponent(location.href)}`; - } + window.location.href = `${basehref}/auth/login?return_url=${encodeURIComponent(location.href)}`; } else { history.push(`/login?return_url=${encodeURIComponent(location.href)}`); } diff --git a/ui/src/app/login/components/login.tsx b/ui/src/app/login/components/login.tsx index 6d3bb97fae05c..1b6641836201b 100644 --- a/ui/src/app/login/components/login.tsx +++ b/ui/src/app/login/components/login.tsx @@ -1,4 +1,4 @@ -import {FormField, NotificationType} from 'argo-ui'; +import {FormField} from 'argo-ui'; import * as PropTypes from 'prop-types'; import * as React from 'react'; import {Form, Text} from 'react-form'; @@ -7,7 +7,6 @@ import {RouteComponentProps} from 'react-router'; import {AppContext} from '../../shared/context'; import {AuthSettings} from '../../shared/models'; import {services} from '../../shared/services'; -import {getPKCERedirectURI, pkceLogin} from './utils'; require('./login.scss'); @@ -62,18 +61,7 @@ export class Login extends React.Component, State> { {ssoConfigured && (
- - pkceLogin(authSettings.oidcConfig, getPKCERedirectURI().toString()).catch(err => { - this.appContext.apis.notifications.show({ - type: NotificationType.Error, - content: err?.message || JSON.stringify(err) - }); - }) - } - : {href: `auth/login?return_url=${encodeURIComponent(this.state.returnUrl)}`})}> +