From c09d64cbb56daad32210501b52557b6eb0a811d1 Mon Sep 17 00:00:00 2001 From: Zacaria <> Date: Thu, 17 Oct 2024 17:41:32 +0200 Subject: [PATCH 1/2] feat: support custom jwt token auth --- .../swagger-ui-plugins/plugins/auth/auth-select.component.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/swagger-ui-plugins/plugins/auth/auth-select.component.tsx b/packages/swagger-ui-plugins/plugins/auth/auth-select.component.tsx index 239a579..b3864f5 100644 --- a/packages/swagger-ui-plugins/plugins/auth/auth-select.component.tsx +++ b/packages/swagger-ui-plugins/plugins/auth/auth-select.component.tsx @@ -20,7 +20,7 @@ export function AuthSelectComponent(props: System) { }) .map((value, connection) => { const profile = decodeToken(value?.getIn(["token", "id_token"]) as string | undefined); - const token = decodeToken(value?.getIn(["token", "access_token"]) as string); + const token = decodeToken(value?.getIn(["token", "access_token"]) as string) || decodeToken(value?.getIn(["value"]) as string); const authName = getOauthName(connection!).replace("OAuth ", ""); const scopes = token.scope; const cmAuthName = authName === "GO" ? (scopes.includes("partner") ? "Partner" : "GO") : authName; From 75c23be757e34e0d27f19de17fccdab09a9c11b3 Mon Sep 17 00:00:00 2001 From: Zacaria <> Date: Fri, 18 Oct 2024 10:47:09 +0200 Subject: [PATCH 2/2] fix: spacing --- packages/swagger-ui-plugins/styles/auth.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/swagger-ui-plugins/styles/auth.css b/packages/swagger-ui-plugins/styles/auth.css index fb3a7c2..3bfdc3f 100644 --- a/packages/swagger-ui-plugins/styles/auth.css +++ b/packages/swagger-ui-plugins/styles/auth.css @@ -11,3 +11,9 @@ margin-right: 10px; } } + +.swagger-ui .auth-btn-wrapper { + display: flex; + justify-content: center; + @apply gap-12; +}