Skip to content

Commit

Permalink
Set autocomplete password field to off (#793)
Browse files Browse the repository at this point in the history
* Invalidate auth tokens based on IAT

* Set autocomplete header on password field to off

* version
  • Loading branch information
michielderoos authored Mar 21, 2022
1 parent 6dfda05 commit f996daf
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions app/client/components/auth/loginForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import { LoginAction } from "../../reducers/auth/actions";

import TFAForm from "./TFAForm.jsx";

const mapStateToProps = state => {
const mapStateToProps = (state) => {
return {
login_status: state.login
login_status: state.login,
};
};

const mapDispatchToProps = dispatch => {
const mapDispatchToProps = (dispatch) => {
return {
loginRequest: payload => dispatch(LoginAction.loginRequest(payload))
loginRequest: (payload) => dispatch(LoginAction.loginRequest(payload)),
};
};

Expand All @@ -30,12 +30,12 @@ export class LoginFormContainer extends React.Component {
this.props.loginRequest({
body: {
username: values.email,
password: values.password
}
password: values.password,
},
});
}

onFinishFailed = errorInfo => {
onFinishFailed = (errorInfo) => {
// console.log("Failed:", errorInfo);
};

Expand All @@ -60,7 +60,7 @@ export class LoginFormContainer extends React.Component {
}
}

const LoginForm = function(props) {
const LoginForm = function (props) {
return (
<div>
<Form
Expand All @@ -80,6 +80,7 @@ const LoginForm = function(props) {
aria-label="Password"
name="password"
rules={[{ required: true, message: "Please enter your password!" }]}
autocomplete="off"
>
<Input
placeholder="Password"
Expand All @@ -103,7 +104,4 @@ const LoginForm = function(props) {
</div>
);
};
export default connect(
mapStateToProps,
mapDispatchToProps
)(LoginFormContainer);
export default connect(mapStateToProps, mapDispatchToProps)(LoginFormContainer);

0 comments on commit f996daf

Please sign in to comment.