Commit 5c95fa2b by Zhuangzai fa Committed by GitHub

Refactor login initialization logic to remove unused configuration check for…

 Refactor login initialization logic to remove unused configuration check for bd_vid and simplify OAuth visibility condition. (#5283)
parent 8e94fdb9
......@@ -116,7 +116,7 @@ const FormLayout = ({ children, setPageType, pageType }: Props) => {
);
const show_oauth = useMemo(
() => !getBdVId() && !!(feConfigs?.sso?.url || oAuthList.length > 0),
() => !!(feConfigs?.sso?.url || oAuthList.length > 0),
[feConfigs?.sso?.url, oAuthList.length]
);
......
......@@ -208,13 +208,6 @@ export const LoginContainer = ({
// initialization logic
useEffect(() => {
// set page type based on configuration
const bd_vid = getBdVId();
if (bd_vid) {
setPageType(LoginPageTypeEnum.passwordLogin);
return;
}
setPageType(
feConfigs?.oauth?.wechat ? LoginPageTypeEnum.wechat : LoginPageTypeEnum.passwordLogin
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment