mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-01 13:13:10 +00:00
Skip signin page if auth config is empty (#33)
* Fixing behaviour for secure and non-secure mode * Adding swagger html to prettier ignore files
This commit is contained in:
parent
f92151eed1
commit
dba033711d
@ -30,5 +30,10 @@ dist/
|
||||
.prettierignore
|
||||
.eslintignore
|
||||
|
||||
# rc, json and html files
|
||||
.prettierrc
|
||||
.lintstagedrc.json
|
||||
swagger.html
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
|
@ -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<AuthProviderProps> = ({
|
||||
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,
|
||||
|
@ -100,7 +100,7 @@ const Signup = () => {
|
||||
...details,
|
||||
teams: selectedTeams as Array<string>,
|
||||
profile: {
|
||||
images: getImages(appState.newUser.picture),
|
||||
images: getImages(appState.newUser.picture ?? ''),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user