Skip to content

Commit

Permalink
Merge pull request #1124 from botpress/ya-fix-login
Browse files Browse the repository at this point in the history
fix(login): problem when logging in and password is expired
  • Loading branch information
allardy authored Nov 16, 2018
2 parents 6e098ca + 0416b53 commit 6b82d58
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/bp/ui-admin/src/Pages/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ export default class Login extends Component {
})
} catch (err) {
if (err.type === 'PasswordExpiredError') {
this.setState({ passwordExpired: true, username, password })
if (!this.state.username || !this.state.password) {
this.setState({ username, password })
}

this.setState({ passwordExpired: true })
} else {
showError && this.setState({ error: err.message })
}
Expand Down

0 comments on commit 6b82d58

Please sign in to comment.