mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 05:10:19 +08:00
Remove onLoggedIn().
This commit is contained in:
@ -309,11 +309,11 @@ class App extends Component {
|
|||||||
</Menu>
|
</Menu>
|
||||||
</Header>
|
</Header>
|
||||||
<Switch>
|
<Switch>
|
||||||
<Route exact path="/register" render={(props) => this.renderHomeIfLoggedIn(<RegisterPage onLoggedIn={this.onLoggedIn.bind(this)} {...props} />)}/>
|
<Route exact path="/register" render={(props) => this.renderHomeIfLoggedIn(<RegisterPage {...props} />)}/>
|
||||||
<Route exact path="/result" render={(props) => this.renderHomeIfLoggedIn(<ResultPage {...props} />)}/>
|
<Route exact path="/result" render={(props) => this.renderHomeIfLoggedIn(<ResultPage {...props} />)}/>
|
||||||
<Route exact path="/login" render={(props) => this.renderHomeIfLoggedIn(<SelfLoginPage onLoggedIn={this.onLoggedIn.bind(this)} {...props} />)}/>
|
<Route exact path="/login" render={(props) => this.renderHomeIfLoggedIn(<SelfLoginPage {...props} />)}/>
|
||||||
<Route exact path="/callback" component={AuthCallback}/>
|
<Route exact path="/callback" component={AuthCallback}/>
|
||||||
<Route exact path="/" render={(props) => this.renderLoginIfNotLoggedIn(<HomePage account={this.state.account} onLoggedIn={this.onLoggedIn.bind(this)} {...props} />)}/>
|
<Route exact path="/" render={(props) => this.renderLoginIfNotLoggedIn(<HomePage account={this.state.account} {...props} />)}/>
|
||||||
<Route exact path="/account" render={(props) => this.renderLoginIfNotLoggedIn(<AccountPage account={this.state.account} {...props} />)}/>
|
<Route exact path="/account" render={(props) => this.renderLoginIfNotLoggedIn(<AccountPage account={this.state.account} {...props} />)}/>
|
||||||
<Route exact path="/organizations" render={(props) => this.renderLoginIfNotLoggedIn(<OrganizationListPage account={this.state.account} {...props} />)}/>
|
<Route exact path="/organizations" render={(props) => this.renderLoginIfNotLoggedIn(<OrganizationListPage account={this.state.account} {...props} />)}/>
|
||||||
<Route exact path="/organizations/:organizationName" render={(props) => this.renderLoginIfNotLoggedIn(<OrganizationEditPage account={this.state.account} {...props} />)}/>
|
<Route exact path="/organizations/:organizationName" render={(props) => this.renderLoginIfNotLoggedIn(<OrganizationEditPage account={this.state.account} {...props} />)}/>
|
||||||
|
@ -74,7 +74,6 @@ class AuthCallback extends React.Component {
|
|||||||
if (res.status === 'ok') {
|
if (res.status === 'ok') {
|
||||||
const responseType = this.getResponseType();
|
const responseType = this.getResponseType();
|
||||||
if (responseType === "login") {
|
if (responseType === "login") {
|
||||||
// this.props.onLoggedIn();
|
|
||||||
Util.showMessage("success", `Logged in successfully`);
|
Util.showMessage("success", `Logged in successfully`);
|
||||||
Util.goToLink("/");
|
Util.goToLink("/");
|
||||||
} else if (responseType === "code") {
|
} else if (responseType === "code") {
|
||||||
|
@ -88,7 +88,6 @@ class LoginPage extends React.Component {
|
|||||||
if (res.status === 'ok') {
|
if (res.status === 'ok') {
|
||||||
const responseType = this.state.type;
|
const responseType = this.state.type;
|
||||||
if (responseType === "login") {
|
if (responseType === "login") {
|
||||||
// this.props.onLoggedIn();
|
|
||||||
Util.showMessage("success", `Logged in successfully`);
|
Util.showMessage("success", `Logged in successfully`);
|
||||||
Util.goToLink("/");
|
Util.goToLink("/");
|
||||||
} else if (responseType === "code") {
|
} else if (responseType === "code") {
|
||||||
|
@ -19,7 +19,7 @@ import {authConfig} from "./Auth";
|
|||||||
class SelfLoginPage extends React.Component {
|
class SelfLoginPage extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<LoginPage type={"login"} applicationName={authConfig.appName} account={this.props.account} onLoggedIn={this.props.onLoggedIn.bind(this)} {...this.props} />
|
<LoginPage type={"login"} applicationName={authConfig.appName} account={this.props.account} {...this.props} />
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user