diff --git a/catalog-rest-service/src/main/resources/ui/.prettierignore b/catalog-rest-service/src/main/resources/ui/.prettierignore index 5a51d29066e..e45db894836 100644 --- a/catalog-rest-service/src/main/resources/ui/.prettierignore +++ b/catalog-rest-service/src/main/resources/ui/.prettierignore @@ -30,5 +30,10 @@ dist/ .prettierignore .eslintignore +# rc, json and html files +.prettierrc +.lintstagedrc.json +swagger.html + # macOS .DS_Store diff --git a/catalog-rest-service/src/main/resources/ui/src/auth-provider/AuthProvider.tsx b/catalog-rest-service/src/main/resources/ui/src/auth-provider/AuthProvider.tsx index c05b90ca496..b688aec90a9 100644 --- a/catalog-rest-service/src/main/resources/ui/src/auth-provider/AuthProvider.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/auth-provider/AuthProvider.tsx @@ -17,7 +17,7 @@ import { AxiosResponse } from 'axios'; import { CookieStorage } from 'cookie-storage'; -import { isEmpty } from 'lodash'; +import { isEmpty, isNil } from 'lodash'; import { observer } from 'mobx-react'; import { User } from 'Models'; import { UserManager, WebStorageStateStore } from 'oidc-client'; @@ -155,7 +155,10 @@ const AuthProvider: FunctionComponent = ({ const fetchAuthConfig = (): void => { fetchAuthorizerConfig() .then((res: AxiosResponse) => { - if (res.data) { + const isSecureMode = + !isNil(res.data) && + Object.values(res.data).filter((item) => isNil(item)).length === 0; + if (isSecureMode) { const { provider, authority, clientId, callbackUrl } = res.data; const userConfig = getUserManagerConfig({ authority, diff --git a/catalog-rest-service/src/main/resources/ui/src/pages/signup/index.tsx b/catalog-rest-service/src/main/resources/ui/src/pages/signup/index.tsx index 7d8e8180652..5e919650514 100644 --- a/catalog-rest-service/src/main/resources/ui/src/pages/signup/index.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/pages/signup/index.tsx @@ -100,7 +100,7 @@ const Signup = () => { ...details, teams: selectedTeams as Array, profile: { - images: getImages(appState.newUser.picture), + images: getImages(appState.newUser.picture ?? ''), }, }); }