Skip to content

Commit 1248937

Browse files
committed
Clear localstore on login
1 parent 60a18e7 commit 1248937

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

client/src/components/Auth/Login.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ import LoginForm from './LoginForm';
88
import { login } from '../../store/auth';
99

1010
export class Login extends Component {
11+
componentWillMount() {
12+
localStorage.clear();
13+
}
14+
1115
onSubmit = values => this.props.login(values)
1216
.then(this.props.redirect)
1317
.catch(({ response }) => {

0 commit comments

Comments
 (0)