diff --git a/frontend/src/components/authchooser/AuthChooser.stories.tsx b/frontend/src/components/authchooser/AuthChooser.stories.tsx
index 2699269add..c5fbc9bbc9 100644
--- a/frontend/src/components/authchooser/AuthChooser.stories.tsx
+++ b/frontend/src/components/authchooser/AuthChooser.stories.tsx
@@ -32,7 +32,6 @@ const argFixture = {
error: null,
oauthUrl: 'http://example.com/',
clusterAuthType: '',
- haveClusters: false,
};
export const BasicAuthChooser = Template.bind({});
@@ -49,7 +48,6 @@ Testing.args = {
export const HaveClusters = Template.bind({});
HaveClusters.args = {
...argFixture,
- haveClusters: true,
};
export const AuthTypeoidc = Template.bind({});
diff --git a/frontend/src/components/authchooser/__snapshots__/AuthChooser.AnError.stories.storyshot b/frontend/src/components/authchooser/__snapshots__/AuthChooser.AnError.stories.storyshot
index 428def9f99..6fc0ade153 100644
--- a/frontend/src/components/authchooser/__snapshots__/AuthChooser.AnError.stories.storyshot
+++ b/frontend/src/components/authchooser/__snapshots__/AuthChooser.AnError.stories.storyshot
@@ -127,6 +127,25 @@
+
diff --git a/frontend/src/components/authchooser/__snapshots__/AuthChooser.AuthTypeoidc.stories.storyshot b/frontend/src/components/authchooser/__snapshots__/AuthChooser.AuthTypeoidc.stories.storyshot
index b825b7f9ef..f1cc99d16b 100644
--- a/frontend/src/components/authchooser/__snapshots__/AuthChooser.AuthTypeoidc.stories.storyshot
+++ b/frontend/src/components/authchooser/__snapshots__/AuthChooser.AuthTypeoidc.stories.storyshot
@@ -136,6 +136,25 @@
+
diff --git a/frontend/src/components/authchooser/__snapshots__/AuthChooser.BasicAuthChooser.stories.storyshot b/frontend/src/components/authchooser/__snapshots__/AuthChooser.BasicAuthChooser.stories.storyshot
index afb192f7fa..66410fd28b 100644
--- a/frontend/src/components/authchooser/__snapshots__/AuthChooser.BasicAuthChooser.stories.storyshot
+++ b/frontend/src/components/authchooser/__snapshots__/AuthChooser.BasicAuthChooser.stories.storyshot
@@ -122,6 +122,25 @@
+
diff --git a/frontend/src/components/authchooser/__snapshots__/AuthChooser.Testing.stories.storyshot b/frontend/src/components/authchooser/__snapshots__/AuthChooser.Testing.stories.storyshot
index c1d8d98679..0a9acce786 100644
--- a/frontend/src/components/authchooser/__snapshots__/AuthChooser.Testing.stories.storyshot
+++ b/frontend/src/components/authchooser/__snapshots__/AuthChooser.Testing.stories.storyshot
@@ -118,6 +118,25 @@
+
diff --git a/frontend/src/components/authchooser/index.tsx b/frontend/src/components/authchooser/index.tsx
index abc733b212..6f5d78b3be 100644
--- a/frontend/src/components/authchooser/index.tsx
+++ b/frontend/src/components/authchooser/index.tsx
@@ -186,7 +186,6 @@ function AuthChooser({ children }: AuthChooserProps) {
? t('Authentication: {{ clusterName }}', { clusterName })
: t('Authentication')
}
- haveClusters={!!clusters && Object.keys(clusters).length > 1}
error={error}
oauthUrl={`${helpers.getAppUrl()}oidc?dt=${Date()}&cluster=${getCluster()}`}
clusterAuthType={clusterAuthType}
@@ -199,7 +198,7 @@ function AuthChooser({ children }: AuthChooserProps) {
});
}}
handleBackButtonPress={() => {
- history.goBack();
+ numClusters > 1 ? history.goBack() : history.push('/');
}}
handleTokenAuth={() => {
history.push({
@@ -221,7 +220,6 @@ export interface PureAuthChooserProps {
error: Error | null;
oauthUrl: string;
clusterAuthType: string;
- haveClusters: boolean;
handleOidcAuth: () => void;
handleTokenAuth: () => void;
handleTryAgain: () => void;
@@ -237,7 +235,6 @@ export function PureAuthChooser({
error,
oauthUrl,
clusterAuthType,
- haveClusters,
handleOidcAuth,
handleTokenAuth,
handleTryAgain,
@@ -310,25 +307,23 @@ export function PureAuthChooser({
)}
)}
- {haveClusters && (
-
-
-
-
-
-
- {t('translation|Back')}
-
+
+
+
+
+
+
+ {t('translation|Back')}
- )}
+
{children}
);