2021-02-13 13:30:51 +08:00
|
|
|
// Copyright 2021 The casbin Authors. All Rights Reserved.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
2021-02-13 12:15:19 +08:00
|
|
|
import React from "react";
|
2021-06-14 22:42:58 +08:00
|
|
|
import {Link} from "react-router-dom";
|
2021-08-07 00:14:24 +08:00
|
|
|
import {Button, Checkbox, Col, Form, Input, Result, Row, Spin} from "antd";
|
2021-02-13 12:15:19 +08:00
|
|
|
import {LockOutlined, UserOutlined} from "@ant-design/icons";
|
2021-02-14 15:40:57 +08:00
|
|
|
import * as AuthBackend from "./AuthBackend";
|
2021-04-19 01:14:41 +08:00
|
|
|
import * as ApplicationBackend from "../backend/ApplicationBackend";
|
2021-02-14 16:59:08 +08:00
|
|
|
import * as Provider from "./Provider";
|
2021-02-14 15:40:57 +08:00
|
|
|
import * as Util from "./Util";
|
2021-03-26 21:58:19 +08:00
|
|
|
import * as Setting from "../Setting";
|
2021-06-14 23:43:09 +08:00
|
|
|
import {GithubLoginButton, GoogleLoginButton} from "react-social-login-buttons";
|
2021-06-14 23:29:22 +08:00
|
|
|
import FacebookLoginButton from "./FacebookLoginButton";
|
2021-03-29 22:11:28 +08:00
|
|
|
import QqLoginButton from "./QqLoginButton";
|
2021-06-14 23:29:22 +08:00
|
|
|
import DingTalkLoginButton from "./DingTalkLoginButton";
|
|
|
|
import GiteeLoginButton from "./GiteeLoginButton";
|
|
|
|
import WechatLoginButton from "./WechatLoginButton";
|
|
|
|
import WeiboLoginButton from "./WeiboLoginButton";
|
2021-04-27 22:03:22 +08:00
|
|
|
import i18next from "i18next";
|
2021-08-01 22:10:47 +08:00
|
|
|
import LinkedInLoginButton from "./LinkedInLoginButton";
|
|
|
|
import WeComLoginButton from "./WeComLoginButton";
|
2021-02-13 12:15:19 +08:00
|
|
|
|
2021-03-26 21:56:51 +08:00
|
|
|
class LoginPage extends React.Component {
|
2021-02-13 12:15:19 +08:00
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
this.state = {
|
|
|
|
classes: props,
|
2021-03-20 11:34:04 +08:00
|
|
|
type: props.type,
|
2021-02-13 12:15:19 +08:00
|
|
|
applicationName: props.applicationName !== undefined ? props.applicationName : (props.match === undefined ? null : props.match.params.applicationName),
|
|
|
|
application: null,
|
2021-06-14 22:42:58 +08:00
|
|
|
mode: props.mode !== undefined ? props.mode : (props.match === undefined ? null : props.match.params.mode), // "signup" or "signin"
|
2021-03-20 11:34:04 +08:00
|
|
|
msg: null,
|
2021-02-13 12:15:19 +08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2021-03-27 11:38:15 +08:00
|
|
|
UNSAFE_componentWillMount() {
|
2021-03-20 11:34:04 +08:00
|
|
|
if (this.state.type === "login") {
|
|
|
|
this.getApplication();
|
|
|
|
} else if (this.state.type === "code") {
|
|
|
|
this.getApplicationLogin();
|
|
|
|
} else {
|
|
|
|
Util.showMessage("error", `Unknown authentication type: ${this.state.type}`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
getApplicationLogin() {
|
2021-03-20 16:51:10 +08:00
|
|
|
const oAuthParams = Util.getOAuthGetParameters();
|
|
|
|
AuthBackend.getApplicationLogin(oAuthParams)
|
2021-03-20 11:34:04 +08:00
|
|
|
.then((res) => {
|
|
|
|
if (res.status === "ok") {
|
|
|
|
this.setState({
|
|
|
|
application: res.data,
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
// Util.showMessage("error", res.msg);
|
|
|
|
this.setState({
|
|
|
|
application: res.data,
|
|
|
|
msg: res.msg,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
2021-02-13 12:15:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
getApplication() {
|
2021-02-13 23:00:43 +08:00
|
|
|
if (this.state.applicationName === null) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2021-04-19 01:14:41 +08:00
|
|
|
ApplicationBackend.getApplication("admin", this.state.applicationName)
|
2021-02-13 12:15:19 +08:00
|
|
|
.then((application) => {
|
|
|
|
this.setState({
|
|
|
|
application: application,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
getApplicationObj() {
|
|
|
|
if (this.props.application !== undefined) {
|
|
|
|
return this.props.application;
|
|
|
|
} else {
|
|
|
|
return this.state.application;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-20 22:17:03 +08:00
|
|
|
onUpdateAccount(account) {
|
|
|
|
this.props.onUpdateAccount(account);
|
|
|
|
}
|
|
|
|
|
2021-02-13 12:15:19 +08:00
|
|
|
onFinish(values) {
|
2021-06-20 22:17:03 +08:00
|
|
|
const application = this.getApplicationObj();
|
|
|
|
const ths = this;
|
2021-03-20 16:51:10 +08:00
|
|
|
values["type"] = this.state.type;
|
|
|
|
const oAuthParams = Util.getOAuthGetParameters();
|
2021-06-20 22:17:03 +08:00
|
|
|
|
2021-03-20 16:51:10 +08:00
|
|
|
AuthBackend.login(values, oAuthParams)
|
2021-02-13 12:15:19 +08:00
|
|
|
.then((res) => {
|
|
|
|
if (res.status === 'ok') {
|
2021-03-21 00:38:00 +08:00
|
|
|
const responseType = this.state.type;
|
|
|
|
if (responseType === "login") {
|
2021-03-20 13:05:34 +08:00
|
|
|
Util.showMessage("success", `Logged in successfully`);
|
2021-03-26 21:58:19 +08:00
|
|
|
Setting.goToLink("/");
|
2021-03-21 00:38:00 +08:00
|
|
|
} else if (responseType === "code") {
|
2021-03-20 22:34:22 +08:00
|
|
|
const code = res.data;
|
2021-06-20 22:17:03 +08:00
|
|
|
|
|
|
|
if (Setting.hasPromptPage(application)) {
|
|
|
|
AuthBackend.getAccount("")
|
|
|
|
.then((res) => {
|
|
|
|
let account = null;
|
|
|
|
if (res.status === "ok") {
|
|
|
|
account = res.data;
|
|
|
|
account.organization = res.data2;
|
|
|
|
|
|
|
|
this.onUpdateAccount(account);
|
|
|
|
|
|
|
|
if (Setting.isPromptAnswered(account, application)) {
|
|
|
|
Setting.goToLink(`${oAuthParams.redirectUri}?code=${code}&state=${oAuthParams.state}`);
|
|
|
|
} else {
|
|
|
|
Setting.goToLinkSoft(ths, `/prompt/${application.name}?redirectUri=${oAuthParams.redirectUri}&code=${code}&state=${oAuthParams.state}`);
|
|
|
|
}
|
|
|
|
} else {
|
2021-08-01 00:16:13 +08:00
|
|
|
Setting.showMessage("error", `Failed to sign in: ${res.msg}`);
|
2021-06-20 22:17:03 +08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
Setting.goToLink(`${oAuthParams.redirectUri}?code=${code}&state=${oAuthParams.state}`);
|
|
|
|
}
|
|
|
|
|
2021-03-20 22:34:22 +08:00
|
|
|
// Util.showMessage("success", `Authorization code: ${res.data}`);
|
2021-03-20 13:05:34 +08:00
|
|
|
}
|
2021-02-13 12:15:19 +08:00
|
|
|
} else {
|
2021-03-26 21:57:41 +08:00
|
|
|
Util.showMessage("error", `Failed to log in: ${res.msg}`);
|
2021-02-13 12:15:19 +08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2021-06-11 20:33:22 +08:00
|
|
|
getSigninButton(type) {
|
|
|
|
const text = i18next.t("login:Sign in with {type}").replace("{type}", type);
|
2021-03-29 22:11:28 +08:00
|
|
|
if (type === "GitHub") {
|
2021-06-14 23:43:09 +08:00
|
|
|
return <GithubLoginButton text={text} align={"center"} />
|
2021-03-29 22:11:28 +08:00
|
|
|
} else if (type === "Google") {
|
2021-06-14 23:43:09 +08:00
|
|
|
return <GoogleLoginButton text={text} align={"center"} />
|
2021-03-29 22:11:28 +08:00
|
|
|
} else if (type === "QQ") {
|
2021-06-14 23:43:09 +08:00
|
|
|
return <QqLoginButton text={text} align={"center"} />
|
2021-06-14 23:29:22 +08:00
|
|
|
} else if (type === "Facebook") {
|
2021-06-14 23:43:09 +08:00
|
|
|
return <FacebookLoginButton text={text} align={"center"} />
|
2021-06-14 23:29:22 +08:00
|
|
|
} else if (type === "Weibo") {
|
2021-06-14 23:43:09 +08:00
|
|
|
return <WeiboLoginButton text={text} align={"center"} />
|
2021-06-14 23:29:22 +08:00
|
|
|
} else if (type === "Gitee") {
|
2021-06-14 23:43:09 +08:00
|
|
|
return <GiteeLoginButton text={text} align={"center"} />
|
2021-06-14 23:29:22 +08:00
|
|
|
} else if (type === "WeChat") {
|
2021-06-14 23:43:09 +08:00
|
|
|
return <WechatLoginButton text={text} align={"center"} />
|
2021-06-14 23:29:22 +08:00
|
|
|
} else if (type === "DingTalk") {
|
2021-06-14 23:43:09 +08:00
|
|
|
return <DingTalkLoginButton text={text} align={"center"} />
|
2021-08-01 22:10:47 +08:00
|
|
|
} else if (type === "LinkedIn"){
|
|
|
|
return <LinkedInLoginButton text={text} align={"center"} />
|
|
|
|
} else if (type === "WeCom") {
|
|
|
|
return <WeComLoginButton text={text} align={"center"} />
|
2021-03-29 22:11:28 +08:00
|
|
|
}
|
2021-08-01 22:10:47 +08:00
|
|
|
|
|
|
|
return text;
|
2021-03-29 22:11:28 +08:00
|
|
|
}
|
|
|
|
|
2021-03-28 20:20:40 +08:00
|
|
|
renderProviderLogo(provider, application, width, margin, size) {
|
|
|
|
if (size === "small") {
|
|
|
|
return (
|
|
|
|
<a key={provider.displayName} href={Provider.getAuthUrl(application, provider, "signup")}>
|
|
|
|
<img width={width} height={width} src={Provider.getAuthLogo(provider)} alt={provider.displayName} style={{margin: margin}} />
|
|
|
|
</a>
|
|
|
|
)
|
|
|
|
} else {
|
|
|
|
return (
|
2021-03-29 22:11:28 +08:00
|
|
|
<div key={provider.displayName} style={{marginBottom: "10px"}}>
|
|
|
|
<a href={Provider.getAuthUrl(application, provider, "signup")}>
|
|
|
|
{
|
2021-06-11 20:33:22 +08:00
|
|
|
this.getSigninButton(provider.type)
|
2021-03-29 22:11:28 +08:00
|
|
|
}
|
|
|
|
</a>
|
|
|
|
</div>
|
2021-03-28 20:20:40 +08:00
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-14 22:42:58 +08:00
|
|
|
isProviderVisible(providerItem) {
|
|
|
|
if (this.state.mode === "signup") {
|
|
|
|
return Setting.isProviderVisibleForSignUp(providerItem);
|
|
|
|
} else {
|
|
|
|
return Setting.isProviderVisibleForSignIn(providerItem);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-20 12:29:34 +08:00
|
|
|
renderForm(application) {
|
|
|
|
if (this.state.msg !== null) {
|
2021-03-25 23:22:34 +08:00
|
|
|
return Util.renderMessage(this.state.msg)
|
2021-03-20 11:34:04 +08:00
|
|
|
}
|
|
|
|
|
2021-06-14 22:42:58 +08:00
|
|
|
if (this.state.mode === "signup" && !application.enableSignUp) {
|
|
|
|
return (
|
|
|
|
<Result
|
|
|
|
status="error"
|
|
|
|
title="Sign Up Error"
|
|
|
|
subTitle={"The application does not allow to sign up new account"}
|
|
|
|
extra={[
|
|
|
|
<Link onClick={() => {
|
|
|
|
Setting.goToLogin(this, application);
|
|
|
|
}}>
|
|
|
|
<Button type="primary" key="signin">
|
|
|
|
Sign In
|
|
|
|
</Button>
|
|
|
|
</Link>
|
|
|
|
]}
|
|
|
|
>
|
|
|
|
</Result>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2021-03-26 21:58:30 +08:00
|
|
|
if (application.enablePassword) {
|
|
|
|
return (
|
|
|
|
<Form
|
|
|
|
name="normal_login"
|
|
|
|
initialValues={{
|
|
|
|
organization: application.organization,
|
2021-06-20 22:17:03 +08:00
|
|
|
application: application.name,
|
2021-08-06 20:04:08 +08:00
|
|
|
autoSignin: true,
|
2021-03-26 21:58:30 +08:00
|
|
|
}}
|
2021-06-20 22:17:03 +08:00
|
|
|
onFinish={(values) => {this.onFinish(values)}}
|
2021-03-26 21:58:30 +08:00
|
|
|
style={{width: "250px"}}
|
|
|
|
size="large"
|
2021-02-13 12:15:19 +08:00
|
|
|
>
|
2021-06-21 01:01:16 +08:00
|
|
|
<Form.Item
|
|
|
|
style={{height: 0, visibility: "hidden"}}
|
|
|
|
name="application"
|
|
|
|
rules={[
|
|
|
|
{
|
|
|
|
required: true,
|
|
|
|
message: 'Please input your application!',
|
|
|
|
},
|
|
|
|
]}
|
|
|
|
>
|
|
|
|
</Form.Item>
|
2021-04-28 21:25:58 +08:00
|
|
|
<Form.Item
|
|
|
|
style={{height: 0, visibility: "hidden"}}
|
|
|
|
name="organization"
|
|
|
|
rules={[
|
|
|
|
{
|
|
|
|
required: true,
|
|
|
|
message: 'Please input your organization!',
|
|
|
|
},
|
|
|
|
]}
|
2021-03-26 21:58:30 +08:00
|
|
|
>
|
2021-02-13 12:15:19 +08:00
|
|
|
</Form.Item>
|
2021-03-26 21:58:30 +08:00
|
|
|
<Form.Item
|
|
|
|
name="username"
|
2021-05-23 23:40:44 +08:00
|
|
|
rules={[{ required: true, message: i18next.t("login:Please input your username, Email or phone!") }]}
|
2021-03-26 21:58:30 +08:00
|
|
|
>
|
|
|
|
<Input
|
|
|
|
prefix={<UserOutlined className="site-form-item-icon" />}
|
2021-05-23 23:40:44 +08:00
|
|
|
placeholder={i18next.t("login:username, Email or phone")}
|
2021-03-26 21:58:30 +08:00
|
|
|
disabled={!application.enablePassword}
|
|
|
|
/>
|
|
|
|
</Form.Item>
|
|
|
|
<Form.Item
|
|
|
|
name="password"
|
2021-04-28 00:47:12 +08:00
|
|
|
rules={[{ required: true, message: i18next.t("login:Please input your password!") }]}
|
2021-02-13 12:15:19 +08:00
|
|
|
>
|
2021-03-26 21:58:30 +08:00
|
|
|
<Input
|
|
|
|
prefix={<LockOutlined className="site-form-item-icon" />}
|
|
|
|
type="password"
|
2021-05-14 23:45:20 +08:00
|
|
|
placeholder={i18next.t("login:Password")}
|
2021-03-26 21:58:30 +08:00
|
|
|
disabled={!application.enablePassword}
|
|
|
|
/>
|
|
|
|
</Form.Item>
|
|
|
|
<Form.Item>
|
2021-07-18 07:54:49 +08:00
|
|
|
<Form.Item name="autoSignin" valuePropName="checked" noStyle>
|
2021-03-26 21:58:30 +08:00
|
|
|
<Checkbox style={{float: "left"}} disabled={!application.enablePassword}>
|
2021-08-06 20:04:08 +08:00
|
|
|
{i18next.t("login:Auto sign in")}
|
2021-03-26 21:58:30 +08:00
|
|
|
</Checkbox>
|
|
|
|
</Form.Item>
|
2021-06-04 21:09:34 +08:00
|
|
|
<a style={{float: "right"}} onClick={() => {
|
2021-05-03 00:48:02 +08:00
|
|
|
Setting.goToForget(this, application);
|
|
|
|
}}>
|
2021-06-04 21:09:34 +08:00
|
|
|
{i18next.t("login:Forgot password?")}
|
|
|
|
</a>
|
2021-03-26 21:58:30 +08:00
|
|
|
</Form.Item>
|
|
|
|
<Form.Item>
|
|
|
|
<Button
|
|
|
|
type="primary"
|
|
|
|
htmlType="submit"
|
2021-07-24 20:38:33 +08:00
|
|
|
style={{width: "100%", marginBottom: '5px'}}
|
2021-03-26 21:58:30 +08:00
|
|
|
disabled={!application.enablePassword}
|
|
|
|
>
|
2021-04-27 22:03:22 +08:00
|
|
|
{i18next.t("login:Sign In")}
|
2021-03-26 21:58:30 +08:00
|
|
|
</Button>
|
|
|
|
{
|
2021-06-14 22:42:58 +08:00
|
|
|
!application.enableSignUp ? null : this.renderFooter(application)
|
2021-03-26 21:58:30 +08:00
|
|
|
}
|
|
|
|
</Form.Item>
|
|
|
|
<Form.Item>
|
|
|
|
{
|
2021-06-14 22:42:58 +08:00
|
|
|
application.providers.filter(providerItem => this.isProviderVisible(providerItem)).map(providerItem => {
|
2021-06-14 21:35:19 +08:00
|
|
|
return this.renderProviderLogo(providerItem.provider, application, 30, 5, "small");
|
2021-03-26 21:58:30 +08:00
|
|
|
})
|
|
|
|
}
|
|
|
|
</Form.Item>
|
|
|
|
</Form>
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
return (
|
|
|
|
<div style={{marginTop: "20px"}}>
|
2021-03-28 19:15:10 +08:00
|
|
|
<div style={{fontSize: 16, textAlign: "left"}}>
|
2021-06-11 20:33:22 +08:00
|
|
|
{i18next.t("login:To access")}
|
2021-03-27 11:38:15 +08:00
|
|
|
<a target="_blank" rel="noreferrer" href={application.homepageUrl}>
|
2021-03-29 22:11:28 +08:00
|
|
|
<span style={{fontWeight: "bold"}}>
|
|
|
|
{application.displayName}
|
|
|
|
</span>
|
2021-03-26 21:58:30 +08:00
|
|
|
</a>
|
2021-06-11 20:33:22 +08:00
|
|
|
:
|
2021-02-13 12:15:19 +08:00
|
|
|
</div>
|
2021-03-26 21:58:30 +08:00
|
|
|
<br/>
|
2021-02-13 23:00:43 +08:00
|
|
|
{
|
2021-06-14 22:42:58 +08:00
|
|
|
application.providers.filter(providerItem => this.isProviderVisible(providerItem)).map(providerItem => {
|
2021-06-14 21:35:19 +08:00
|
|
|
return this.renderProviderLogo(providerItem.provider, application, 40, 10, "big");
|
2021-02-13 23:00:43 +08:00
|
|
|
})
|
|
|
|
}
|
2021-03-28 19:15:10 +08:00
|
|
|
{
|
|
|
|
!application.enableSignUp ? null : (
|
|
|
|
<div>
|
|
|
|
<br/>
|
2021-06-14 22:42:58 +08:00
|
|
|
{
|
|
|
|
this.renderFooter(application)
|
|
|
|
}
|
2021-03-28 19:15:10 +08:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
2021-03-26 21:58:30 +08:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
2021-02-13 12:15:19 +08:00
|
|
|
}
|
|
|
|
|
2021-06-14 22:42:58 +08:00
|
|
|
renderFooter(application) {
|
|
|
|
if (this.state.mode === "signup") {
|
|
|
|
return (
|
|
|
|
<div style={{float: "right"}}>
|
|
|
|
{i18next.t("signup:Have account?")}
|
|
|
|
<Link onClick={() => {
|
|
|
|
Setting.goToLogin(this, application);
|
|
|
|
}}>
|
|
|
|
{i18next.t("signup:sign in now")}
|
|
|
|
</Link>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
} else {
|
|
|
|
return (
|
|
|
|
<div style={{float: "right"}}>
|
|
|
|
{i18next.t("login:No account yet?")}
|
|
|
|
<a onClick={() => {
|
|
|
|
Setting.goToSignup(this, application);
|
|
|
|
}}>
|
|
|
|
{i18next.t("login:sign up now")}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-02-13 12:15:19 +08:00
|
|
|
render() {
|
|
|
|
const application = this.getApplicationObj();
|
|
|
|
if (application === null) {
|
2021-03-26 21:58:19 +08:00
|
|
|
return Util.renderMessageLarge(this, this.state.msg);
|
2021-02-13 12:15:19 +08:00
|
|
|
}
|
|
|
|
|
2021-08-07 00:14:24 +08:00
|
|
|
const visibleOAuthProviderItems = application.providers.filter(providerItem => this.isProviderVisible(providerItem));
|
|
|
|
if (this.props.application === undefined && visibleOAuthProviderItems.length === 1) {
|
|
|
|
Setting.goToLink(Provider.getAuthUrl(application, visibleOAuthProviderItems[0].provider, "signup"));
|
|
|
|
return (
|
|
|
|
<div style={{textAlign: "center"}}>
|
|
|
|
<Spin size="large" tip={i18next.t("login:Signing in...")} style={{paddingTop: "10%"}} />
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2021-02-13 12:15:19 +08:00
|
|
|
return (
|
|
|
|
<Row>
|
2021-03-20 11:34:04 +08:00
|
|
|
<Col span={24} style={{display: "flex", justifyContent: "center"}}>
|
2021-06-15 22:12:50 +08:00
|
|
|
<div style={{marginTop: "80px", marginBottom: "50px", textAlign: "center"}}>
|
2021-04-29 21:28:24 +08:00
|
|
|
{
|
|
|
|
Setting.renderHelmet(application)
|
|
|
|
}
|
2021-03-06 21:50:48 +08:00
|
|
|
{
|
2021-04-28 15:54:50 +08:00
|
|
|
Setting.renderLogo(application)
|
2021-03-06 21:50:48 +08:00
|
|
|
}
|
2021-03-15 00:28:34 +08:00
|
|
|
{/*{*/}
|
|
|
|
{/* this.state.clientId !== null ? "Redirect" : null*/}
|
|
|
|
{/*}*/}
|
2021-02-13 12:15:19 +08:00
|
|
|
{
|
|
|
|
this.renderForm(application)
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</Col>
|
|
|
|
</Row>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-26 21:56:51 +08:00
|
|
|
export default LoginPage;
|