Skip to content

Commit e4efacd

Browse files
authored
FUI - Fixed No auth flow error (#2797)
1 parent 6221694 commit e4efacd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/components/operations/operation-details/react/runtime/operation-console/ConsoleAuthorization.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ type ConsoleAuthorizationProps = {
3434
isGqlConsole?: boolean;
3535
}
3636

37-
const noAuthFlow = "no-auth";
37+
export const noAuthFlow = "no-auth";
3838

3939
export const ConsoleAuthorization = ({
4040
api,

src/components/operations/operation-details/react/runtime/operation-console/consoleUtils.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { Utils } from "../../../../../../utils";
1717
import { OAuth2AuthenticationSettings } from "../../../../../../contracts/authenticationSettings";
1818
import { GrantTypes, oauthSessionKey } from "../../../../../../constants";
1919
import { SearchQuery } from "../../../../../../contracts/searchQuery";
20+
import { noAuthFlow } from "./ConsoleAuthorization";
2021

2122
interface SubscriptionOption {
2223
name: string;
@@ -235,7 +236,7 @@ export const onGrantTypeChange = async (
235236
): Promise<ConsoleHeader[]> => {
236237
await clearStoredCredentials(sessionManager);
237238

238-
if (!grantType || grantType === GrantTypes.password) {
239+
if (!grantType || grantType === GrantTypes.password || grantType === noAuthFlow) {
239240
const authHeader = headers?.find(header => header.name() === KnownHttpHeaders.Authorization);
240241
if (authHeader) {
241242
const newHeaders = headers.filter(header => header.id !== authHeader.id);

0 commit comments

Comments
 (0)