Compare commits
1 Commits
remove-com
...
sajjad/aut
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db75d5046d |
@@ -23,6 +23,9 @@ const UnAuthOnlyRoute = (props) => {
|
||||
|
||||
if (isReady) {
|
||||
if (authUser && authUser.username) {
|
||||
if (true) { // check for query param
|
||||
window.parent.postMessage({ authenticated: true }, 'https://discover.edx.org/social-reg');
|
||||
}
|
||||
global.location.href = getConfig().LMS_BASE_URL.concat(DEFAULT_REDIRECT_URL);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -231,7 +231,9 @@ class LoginPage extends React.Component {
|
||||
tpaAuthenticationError.errorCode = TPA_AUTHENTICATION_FAILURE;
|
||||
}
|
||||
if (this.props.loginResult.success) {
|
||||
window.parent.postMessage({ loggedin: true, redirectUrl: this.props.loginResult.redirectUrl }, 'https://discover.edx.org/social-reg');
|
||||
setSurveyCookie('login');
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -241,11 +243,11 @@ class LoginPage extends React.Component {
|
||||
{ siteName: getConfig().SITE_NAME })}
|
||||
</title>
|
||||
</Helmet>
|
||||
<RedirectLogistration
|
||||
success={this.props.loginResult.success}
|
||||
redirectUrl={this.props.loginResult.redirectUrl}
|
||||
finishAuthUrl={thirdPartyAuthContext.finishAuthUrl}
|
||||
/>
|
||||
{/*<RedirectLogistration*/}
|
||||
{/* success={this.props.loginResult.success}*/}
|
||||
{/* redirectUrl={this.props.loginResult.redirectUrl}*/}
|
||||
{/* finishAuthUrl={thirdPartyAuthContext.finishAuthUrl}*/}
|
||||
{/*/>*/}
|
||||
<div className="mw-xs mt-3">
|
||||
<ThirdPartyAuthAlert
|
||||
currentProvider={thirdPartyAuthContext.currentProvider}
|
||||
@@ -292,16 +294,16 @@ class LoginPage extends React.Component {
|
||||
onClick={this.handleSubmit}
|
||||
onMouseDown={(e) => e.preventDefault()}
|
||||
/>
|
||||
<Link
|
||||
id="forgot-password"
|
||||
name="forgot-password"
|
||||
className="btn btn-link font-weight-500 text-body"
|
||||
to={updatePathWithQueryParams(RESET_PAGE)}
|
||||
onClick={this.handleForgotPasswordLinkClickEvent}
|
||||
>
|
||||
{intl.formatMessage(messages['forgot.password'])}
|
||||
</Link>
|
||||
{this.renderThirdPartyAuth(providers, secondaryProviders, currentProvider, thirdPartyAuthApiStatus, intl)}
|
||||
{/*<Link*/}
|
||||
{/* id="forgot-password"*/}
|
||||
{/* name="forgot-password"*/}
|
||||
{/* className="btn btn-link font-weight-500 text-body"*/}
|
||||
{/* to={updatePathWithQueryParams(RESET_PAGE)}*/}
|
||||
{/* onClick={this.handleForgotPasswordLinkClickEvent}*/}
|
||||
{/*>*/}
|
||||
{/* {intl.formatMessage(messages['forgot.password'])}*/}
|
||||
{/*</Link>*/}
|
||||
{/*{this.renderThirdPartyAuth(providers, secondaryProviders, currentProvider, thirdPartyAuthApiStatus, intl)}*/}
|
||||
</Form>
|
||||
</div>
|
||||
</>
|
||||
|
||||
@@ -81,8 +81,8 @@ const Logistration = (props) => {
|
||||
};
|
||||
|
||||
return (
|
||||
<BaseComponent>
|
||||
<div>
|
||||
// <BaseComponent>
|
||||
<div className="d-flex justify-content-center">
|
||||
{disablePublicAccountCreation
|
||||
? (
|
||||
<>
|
||||
@@ -130,7 +130,7 @@ const Logistration = (props) => {
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</BaseComponent>
|
||||
// </BaseComponent>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -510,20 +510,24 @@ const RegistrationPage = (props) => {
|
||||
/>
|
||||
);
|
||||
}
|
||||
if (registrationResult.success) {
|
||||
window.parent.postMessage({ loggedin: true, redirectUrl: registrationResult.redirectUrl }, 'https://discover.edx.org/social-reg');
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<Helmet>
|
||||
<title>{formatMessage(messages['register.page.title'], { siteName: getConfig().SITE_NAME })}</title>
|
||||
</Helmet>
|
||||
<RedirectLogistration
|
||||
success={registrationResult.success}
|
||||
redirectUrl={registrationResult.redirectUrl}
|
||||
finishAuthUrl={finishAuthUrl}
|
||||
optionalFields={optionalFields}
|
||||
redirectToProgressiveProfilingPage={
|
||||
getConfig().ENABLE_PROGRESSIVE_PROFILING_ON_AUTHN && Object.keys(optionalFields).includes('fields')
|
||||
}
|
||||
/>
|
||||
{/*<RedirectLogistration*/}
|
||||
{/* success={registrationResult.success}*/}
|
||||
{/* redirectUrl={registrationResult.redirectUrl}*/}
|
||||
{/* finishAuthUrl={finishAuthUrl}*/}
|
||||
{/* optionalFields={optionalFields}*/}
|
||||
{/* redirectToProgressiveProfilingPage={*/}
|
||||
{/* getConfig().ENABLE_PROGRESSIVE_PROFILING_ON_AUTHN && Object.keys(optionalFields).includes('fields')*/}
|
||||
{/* }*/}
|
||||
{/*/>*/}
|
||||
{autoSubmitRegisterForm && !errorCode.type ? (
|
||||
<div className="mw-xs mt-5 text-center">
|
||||
<Spinner animation="border" variant="primary" id="tpa-spinner" />
|
||||
@@ -613,13 +617,13 @@ const RegistrationPage = (props) => {
|
||||
onClick={handleSubmit}
|
||||
onMouseDown={(e) => e.preventDefault()}
|
||||
/>
|
||||
<ThirdPartyAuth
|
||||
currentProvider={currentProvider}
|
||||
providers={providers}
|
||||
secondaryProviders={secondaryProviders}
|
||||
handleInstitutionLogin={handleInstitutionLogin}
|
||||
thirdPartyAuthApiStatus={thirdPartyAuthApiStatus}
|
||||
/>
|
||||
{/*<ThirdPartyAuth*/}
|
||||
{/* currentProvider={currentProvider}*/}
|
||||
{/* providers={providers}*/}
|
||||
{/* secondaryProviders={secondaryProviders}*/}
|
||||
{/* handleInstitutionLogin={handleInstitutionLogin}*/}
|
||||
{/* thirdPartyAuthApiStatus={thirdPartyAuthApiStatus}*/}
|
||||
{/*/>*/}
|
||||
</Form>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user