From 2675c215655aaef2ef52f1f2c8999a60a1dddec8 Mon Sep 17 00:00:00 2001 From: bzemms Date: Sun, 26 Nov 2017 12:54:10 +0200 Subject: [PATCH] clear error message when COGNITO_USER_UNCONFIRMED Scenario: 1. try top login with wrong credentials. --> err message will appear 2. login with the good credentials --> move to COGNITO_USER_UNCONFIRMED state The bad: error message on confirm screen still display error from step 1 The fix: clear the error message --- src/reducers.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/reducers.js b/src/reducers.js index caec72f..25e6169 100644 --- a/src/reducers.js +++ b/src/reducers.js @@ -137,6 +137,7 @@ export const cognito = (state = initial, action) => { case 'COGNITO_USER_UNCONFIRMED': return Object.assign({}, state, { user: action.user, + error: '', state: CognitoState.CONFIRMATION_REQUIRED, cache: { userName: action.user.username,