diff --git a/src/data/reducers.js b/src/data/reducers.js
index 11c126198e..fea47d91f2 100755
--- a/src/data/reducers.js
+++ b/src/data/reducers.js
@@ -1,3 +1,5 @@
+// Todo: need to change imports when package is published to edly-io
+import { emailCheckReducer, emailCheckStoreName } from '@anas_hameed/edly-saas-widget';
import { combineReducers } from 'redux';
import {
@@ -29,6 +31,7 @@ const createRootReducer = () => combineReducers({
[loginStoreName]: loginReducer,
[registerStoreName]: registerReducer,
[commonComponentsStoreName]: commonComponentsReducer,
+ [emailCheckStoreName]: emailCheckReducer,
[forgotPasswordStoreName]: forgotPasswordReducer,
[resetPasswordStoreName]: resetPasswordReducer,
[authnProgressiveProfilingStoreName]: authnProgressiveProfilingReducers,
diff --git a/src/data/sagas.js b/src/data/sagas.js
index 07c9259c5d..a4a91440fa 100644
--- a/src/data/sagas.js
+++ b/src/data/sagas.js
@@ -1,3 +1,5 @@
+// Todo: need to change imports when package is published to edly-io
+import { emailCheckSaga } from '@anas_hameed/edly-saas-widget';
import { all } from 'redux-saga/effects';
import { saga as commonComponentsSaga } from '../common-components';
@@ -12,6 +14,7 @@ export default function* rootSaga() {
loginSaga(),
registrationSaga(),
commonComponentsSaga(),
+ emailCheckSaga(),
forgotPasswordSaga(),
resetPasswordSaga(),
authnProgressiveProfilingSaga(),
diff --git a/src/login/LoginPage.jsx b/src/login/LoginPage.jsx
index 6281572675..e55bdfe8fe 100644
--- a/src/login/LoginPage.jsx
+++ b/src/login/LoginPage.jsx
@@ -1,6 +1,8 @@
import React, { useEffect, useMemo, useState } from 'react';
-import { connect } from 'react-redux';
+import { connect, useSelector } from 'react-redux';
+// Todo: need to change imports when package is published to edly-io
+import { EdlyLogistrationInfo } from '@anas_hameed/edly-saas-widget';
import { getConfig } from '@edx/frontend-platform';
import { sendPageEvent, sendTrackEvent } from '@edx/frontend-platform/analytics';
import { injectIntl, useIntl } from '@edx/frontend-platform/i18n';
@@ -72,7 +74,12 @@ const LoginPage = (props) => {
const activationMsgType = getActivationStatus();
const queryParams = useMemo(() => getAllPossibleQueryParams(), []);
- const [formFields, setFormFields] = useState({ ...backedUpFormData.formFields });
+ const edlyPrefilledEmail = useSelector(state => state.emailCheck?.prefilledEmail);
+ const edlyContext = useSelector(state => state.emailCheck?.context);
+ const [formFields, setFormFields] = useState({
+ ...backedUpFormData.formFields,
+ emailOrUsername: (!edlyContext?.is_new_user ? edlyPrefilledEmail : '') || backedUpFormData.formFields.emailOrUsername,
+ });
const [errorCode, setErrorCode] = useState({ type: '', count: 0, context: {} });
const [errors, setErrors] = useState({ ...backedUpFormData.errors });
const tpaHint = getTpaHint();
@@ -223,11 +230,13 @@ const LoginPage = (props) => {
messageType={activationMsgType}
/>
{showResetPasswordSuccessBanner &&