Skip to content

Commit

Permalink
Fix stuck on the login screen when continuing as another user (#89232)
Browse files Browse the repository at this point in the history
* Logout user before user continues as another user

* Remove continueAsAnotherUser state
  • Loading branch information
chihsuan authored Apr 9, 2024
1 parent b5eef14 commit b916f5c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions client/blocks/login/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ class Login extends Component {

state = {
isBrowserSupported: isWebAuthnSupported(),
continueAsAnotherUser: false,
};

static defaultProps = {
Expand Down Expand Up @@ -214,8 +213,7 @@ class Login extends Component {
! fromSite &&
! twoFactorEnabled &&
! loginEmailAddress &&
currentUser &&
! this.state.continueAsAnotherUser
currentUser
);
};

Expand Down Expand Up @@ -285,7 +283,7 @@ class Login extends Component {
};

handleContinueAsAnotherUser = () => {
this.setState( { continueAsAnotherUser: true } );
this.props.redirectToLogout( window.location.href );
};

rebootAfterLogin = () => {
Expand Down

0 comments on commit b916f5c

Please sign in to comment.