diff --git a/configs/login_server/grd_login.properties b/configs/login_server/grd_login.properties index 47dc81229..f14568a16 100644 --- a/configs/login_server/grd_login.properties +++ b/configs/login_server/grd_login.properties @@ -22,7 +22,7 @@ loginServer.db.user = root loginServer.db.password = loginServer.db.port = 3306 -frontend.checkEmailPath = http://localhost/account/checkEmail +frontend.checkEmailPath = http://localhost/reset email.disable = true diff --git a/frontend/src/apis/loginAPI.js b/frontend/src/apis/loginAPI.js index 91020ddbb..a095b0b87 100644 --- a/frontend/src/apis/loginAPI.js +++ b/frontend/src/apis/loginAPI.js @@ -64,7 +64,6 @@ const loginAPI = { return apiPost(CONFIG.LOGIN_API_URL + 'createUser', payload) }, sendEmail: async (email, email_text = 7, email_verification_code_type = 'resetPassword') => { - //console.log('api email', email) const payload = { email, email_text, @@ -72,6 +71,23 @@ const loginAPI = { } return apiPost(CONFIG.LOGIN_API_URL + 'sendEmail', payload) }, + loginViaEmailVerificationCode: async (optin) => { + return apiGet( + CONFIG.LOGIN_API_URL + + 'loginViaEmailVerificationCode?emailVerificationCode=' + + optin + ) + }, + changePassword: async (session_id, email, password) => { + const payload = { + session_id, + email, + 'update': { + 'User.password': password, + }, + } + return apiPost(CONFIG.LOGIN_API_URL + 'updateUserInfos', payload) + } } export default loginAPI diff --git a/frontend/src/routes/routes.js b/frontend/src/routes/routes.js index adae0be07..bfaff9de6 100755 --- a/frontend/src/routes/routes.js +++ b/frontend/src/routes/routes.js @@ -59,7 +59,7 @@ const routes = [ component: () => import('../views/Pages/ForgotPassword.vue'), }, { - path: '/reset', + path: '/reset/:optin', component: () => import('../views/Pages/ResetPassword.vue'), }, { path: '*', component: NotFound }, diff --git a/frontend/src/views/Pages/ResetPassword.vue b/frontend/src/views/Pages/ResetPassword.vue index 145fba404..3646e89da 100644 --- a/frontend/src/views/Pages/ResetPassword.vue +++ b/frontend/src/views/Pages/ResetPassword.vue @@ -1,5 +1,5 @@