Skip to content

Commit

Permalink
feat(password): add password requirement to reset and recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLeoB committed May 2, 2022
1 parent 2fbf9e5 commit 9076989
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2173,7 +2173,7 @@ type MessagesType = {
'scenes.login.loginmobile': 'Login via Mobile'
'scenes.logins.twofa.code': 'Enter the Two Factor Authentication code from your code generator or the SMS message just sent'
'scenes.logins.twofa.enter_code': 'Enter your Two Factor Authentication Code'
'scenes.logins.twofa.enter_code.mobile_width': '2 Factor Authentication Code'
'scenes.logins.twofa.enter_code.mobile_width': 'Two Factor Authentication Code'
'scenes.logins.twofa.lost': 'Lost access to your 2FA device?'
'scenes.login.mobile': 'SMS Code'
'scenes.login.gethelp': 'Get Help'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import base64url from 'base64url'
import Login from 'blockchain-wallet-v4-frontend/src/scenes/Login'
import { find, propEq } from 'ramda'
import { startSubmit, stopSubmit } from 'redux-form'
import { call, fork, put, select, take } from 'redux-saga/effects'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const TwoFAExchange = (props: Props) => {
{isMobile() ? (
<FormattedMessage
id='scenes.logins.twofa.enter_code.mobile_width'
defaultMessage='2 Factor Authentication Code'
defaultMessage='Two Factor Authentication Code'
/>
) : (
<FormattedMessage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const TwoFAWallet = (props: Props) => {
(isMobile() ? (
<FormattedMessage
id='scenes.logins.twofa.enter_code.mobile_width'
defaultMessage='Enter your 2FA Code'
defaultMessage='Two Factor Authentication Code'
/>
) : (
<FormattedMessage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ class SecondStep extends React.PureComponent<Props, State> {
validate={[required, validStrongPassword]}
component={PasswordBox}
/>
<div>
<Text size='12px' weight={400} style={{ marginTop: '4px' }}>
<FormattedMessage
id='scenes.register.passwordstrengthwarn'
defaultMessage='Password must be at least 12 characters in length and contain at least one uppercase letter, lowercase letter, number and symbol.'
/>
</Text>
</div>
</FormGroup>
<FormGroup>
<FormLabel htmlFor='confirmationPassword'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React from 'react'
import { FormattedMessage } from 'react-intl'
import { has } from 'ramda'
import { Field } from 'redux-form'
import styled from 'styled-components'

import { HeartbeatLoader } from 'blockchain-info-components'
import { HeartbeatLoader, Text } from 'blockchain-info-components'
import FormGroup from 'components/Form/FormGroup'
import FormLabel from 'components/Form/FormLabel'
import PasswordBox from 'components/Form/PasswordBox'
Expand Down Expand Up @@ -43,6 +42,14 @@ const SecondStep = (props: Props) => {
validate={[required, validStrongPassword]}
component={PasswordBox}
/>
<div>
<Text size='12px' weight={400} style={{ marginTop: '4px' }}>
<FormattedMessage
id='scenes.register.passwordstrengthwarn'
defaultMessage='Password must be at least 12 characters in length and contain at least one uppercase letter, lowercase letter, number and symbol.'
/>
</Text>
</div>
</FormGroup>
<FormGroup>
<FormLabel htmlFor='confirmationPassword'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export const BackArrowFormHeader = (props: {
{props.email}
</Text>
{props.step !== RecoverSteps.RESET_ACCOUNT ||
(props.product !== ProductAuthOptions.EXCHANGE && (
(props.product === ProductAuthOptions.EXCHANGE && (
<Text size='12px' weight={500} color='grey400'>
({firstPartGuid}...{lastPartGuid})
</Text>
Expand Down

0 comments on commit 9076989

Please sign in to comment.