diff --git a/client/actions/user.js b/client/actions/user.js index 2d4e8cbea..5ac9b2267 100644 --- a/client/actions/user.js +++ b/client/actions/user.js @@ -422,13 +422,11 @@ export function cancelPasswordReset() { export function resetPassword(application) { return (dispatch, getState) => { const { user: { user_id }, connection } = getState().passwordReset.toJS(); - const clientId = application.client.value || application.client; dispatch({ type: constants.PASSWORD_RESET, payload: { promise: axios.post(`/api/users/${user_id}/password-reset`, { - connection, - clientId + connection }) }, meta: { diff --git a/client/containers/Users/Dialogs/PasswordResetDialog.jsx b/client/containers/Users/Dialogs/PasswordResetDialog.jsx index 909483f1d..4e0e4bf13 100644 --- a/client/containers/Users/Dialogs/PasswordResetDialog.jsx +++ b/client/containers/Users/Dialogs/PasswordResetDialog.jsx @@ -6,11 +6,9 @@ import { Error, Confirm } from 'auth0-extension-ui'; import submitForm from '../../../actions/submitForm'; import { userActions } from '../../../actions'; -import getAppsForConnection from '../../../selectors/getAppsForConnection'; import getDialogMessage from './getDialogMessage'; import { getName, mapValues } from '../../../utils/display'; import { - useClientField, useDisabledConnectionField, useDisabledEmailField } from '../../../utils/useDefaultFields'; @@ -22,7 +20,6 @@ export default connectContainer(class extends Component { static stateToProps = (state) => ({ connections: state.connections, passwordReset: state.passwordReset, - appsForConnection: getAppsForConnection(state), settings: (state.settings.get('record') && state.settings.get('record').toJS().settings) || {}, languageDictionary: state.languageDictionary }); @@ -36,15 +33,12 @@ export default connectContainer(class extends Component { cancelPasswordReset: PropTypes.func.isRequired, resetPassword: PropTypes.func.isRequired, connections: PropTypes.object.isRequired, - passwordReset: PropTypes.object.isRequired, - appsForConnection: PropTypes.object + passwordReset: PropTypes.object.isRequired }; shouldComponentUpdate(nextProps) { return nextProps.passwordReset !== this.props.passwordReset || - nextProps.languageDictionary !== this.props.languageDictionary || - // nextProps.settings !== this.props.settings || - nextProps.appsForConnection !== this.props.appsForConnection; + nextProps.languageDictionary !== this.props.languageDictionary } onConfirm = () => { @@ -73,11 +67,10 @@ export default connectContainer(class extends Component { getName(user, userFields, languageDictionary)); const fields = _.cloneDeep(userFields) || []; - useClientField(true, fields, this.props.appsForConnection.toJS()); useDisabledConnectionField(true, fields, connection, connections.get('records').toJS()); useDisabledEmailField(true, fields); - const allowedFields = ['email', 'client', 'connection']; + const allowedFields = ['email', 'connection']; const filteredFields = _.filter(fields, field => _.includes(allowedFields, field.property)); @@ -98,7 +91,7 @@ export default connectContainer(class extends Component { {message}