From 91e6dfddccaabbc19d16c21a6badbefde748154d Mon Sep 17 00:00:00 2001 From: Jenni Laakso Date: Tue, 6 Oct 2020 10:27:20 +0300 Subject: [PATCH] Fix issue with ConfirmForm when using ssr. We should not use redirect here --- src/forms/ConfirmSignupForm/ConfirmSignupForm.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/forms/ConfirmSignupForm/ConfirmSignupForm.js b/src/forms/ConfirmSignupForm/ConfirmSignupForm.js index 11411bf62a..24cd1876da 100644 --- a/src/forms/ConfirmSignupForm/ConfirmSignupForm.js +++ b/src/forms/ConfirmSignupForm/ConfirmSignupForm.js @@ -5,7 +5,7 @@ import { FormattedMessage, injectIntl, intlShape } from '../../util/reactIntl'; import { Form as FinalForm } from 'react-final-form'; import classNames from 'classnames'; import * as validators from '../../util/validators'; -import { Form, PrimaryButton, FieldTextInput, NamedRedirect } from '../../components'; +import { Form, PrimaryButton, FieldTextInput } from '../../components'; import css from './ConfirmSignupForm.css'; @@ -27,11 +27,6 @@ const ConfirmSignupFormComponent = props => ( authInfo, } = fieldRenderProps; - // If we don't have authentication information from idp provider, redirect user back to normal signup page - if (!authInfo) { - return ; - } - // email const emailLabel = intl.formatMessage({ id: 'ConfirmSignupForm.emailLabel', @@ -94,6 +89,11 @@ const ConfirmSignupFormComponent = props => ( ); + // If authInfo is not available we should not show the ConfirmForm + if (!authInfo) { + return; + } + // Initial values from idp provider const { email, firstName, lastName, idpId } = authInfo;