diff --git a/src/logistration/LoginPage.jsx b/src/logistration/LoginPage.jsx
index 2fa89b48..3295f140 100644
--- a/src/logistration/LoginPage.jsx
+++ b/src/logistration/LoginPage.jsx
@@ -69,10 +69,10 @@ class LoginPage extends React.Component {
const next = params.get('next');
const courseId = params.get('course_id');
if (next) {
- payload.next = params.next;
+ payload.next = next;
}
if (courseId) {
- payload.course_id = params.course_id;
+ payload.course_id = courseId;
}
if (!this.state.formValid) {
this.validateInput('email', payload.email);
@@ -179,7 +179,7 @@ class LoginPage extends React.Component {
{intl.formatMessage(messages['logistration.first.time.here'])}
-
+
{intl.formatMessage(messages['logistration.create.an.account'])}.
diff --git a/src/logistration/RegistrationPage.jsx b/src/logistration/RegistrationPage.jsx
index e4af1d0f..dc16abe2 100644
--- a/src/logistration/RegistrationPage.jsx
+++ b/src/logistration/RegistrationPage.jsx
@@ -162,10 +162,10 @@ class RegistrationPage extends React.Component {
const next = params.get('next');
const courseId = params.get('course_id');
if (next) {
- payload.next = params.next;
+ payload.next = next;
}
if (courseId) {
- payload.course_id = params.course_id;
+ payload.course_id = courseId;
}
let finalValidation = this.isFormValid();
diff --git a/src/logistration/data/service.js b/src/logistration/data/service.js
index 5ab0279f..c95be123 100644
--- a/src/logistration/data/service.js
+++ b/src/logistration/data/service.js
@@ -10,7 +10,7 @@ export async function registerRequest(registrationInformation) {
const { data } = await getAuthenticatedHttpClient()
.post(
- `${getConfig().LMS_BASE_URL}/user_api/v1/account/registration/`,
+ `${getConfig().LMS_BASE_URL}/user_api/v2/account/registration/`,
querystring.stringify(registrationInformation),
requestConfig,
)
@@ -32,7 +32,7 @@ export async function loginRequest(creds) {
const { data } = await getAuthenticatedHttpClient()
.post(
- `${getConfig().LMS_BASE_URL}/login_ajax`,
+ `${getConfig().LMS_BASE_URL}/user_api/v1/account/login_session/`,
querystring.stringify(creds),
requestConfig,
)
@@ -49,13 +49,13 @@ export async function loginRequest(creds) {
export async function getThirdPartyAuthContext(urlParams) {
const requestConfig = {
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
+ params: urlParams,
isPublic: true,
};
const { data } = await getAuthenticatedHttpClient()
.get(
`${getConfig().LMS_BASE_URL}/api/third_party_auth_context`,
- { params: urlParams },
requestConfig,
)
.catch((e) => {
@@ -74,7 +74,7 @@ export async function getRegistrationForm() {
const { data } = await getAuthenticatedHttpClient()
.get(
- `${getConfig().LMS_BASE_URL}/user_api/v1/account/registration/`,
+ `${getConfig().LMS_BASE_URL}/user_api/v2/account/registration/`,
requestConfig,
)
.catch((e) => {
diff --git a/src/reset-password/data/service.js b/src/reset-password/data/service.js
index cc7f3274..4c2da309 100644
--- a/src/reset-password/data/service.js
+++ b/src/reset-password/data/service.js
@@ -27,15 +27,14 @@ export async function resetPassword(payload, token, queryParams) {
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
isPublic: true,
};
+ const url = new URL(`${getConfig().LMS_BASE_URL}/password/reset/${token}/`);
+
+ if (queryParams.is_account_recovery) {
+ url.searchParams.append('is_account_recovery', true);
+ }
- let path = `password/reset/${token}/?track=pwreset`;
- path += queryParams.is_account_recovery ? '&is_account_recovery=true' : '';
const { data } = await getAuthenticatedHttpClient()
- .post(
- `${getConfig().LMS_BASE_URL}/${path}`,
- formurlencoded(payload),
- requestConfig,
- )
+ .post(url.href, formurlencoded(payload), requestConfig)
.catch((e) => {
throw (e);
});