diff --git a/imports/plugins/core/accounts/client/templates/updatePassword/updatePassword.js b/imports/plugins/core/accounts/client/templates/updatePassword/updatePassword.js
index 16bc22b7351..1f78fc4d6f7 100644
--- a/imports/plugins/core/accounts/client/templates/updatePassword/updatePassword.js
+++ b/imports/plugins/core/accounts/client/templates/updatePassword/updatePassword.js
@@ -9,18 +9,6 @@ import { LoginFormSharedHelpers } from "../../helpers";
import { getComponent } from "/imports/plugins/core/components/lib";
import { LoginFormValidation } from "/lib/api";
-/**
- * Accounts Event: onResetPasswordLink When a user uses a password reset link
- */
-Accounts.onResetPasswordLink((token, done) => {
- Blaze.renderWithData(Template.loginFormUpdatePasswordOverlay, {
- token,
- callback: done,
- isOpen: true,
- type: "updatePassword"
- }, $("body").get(0));
-});
-
/**
* Accounts Event: onEnrollmentLink When a user uses an enrollment link
*/
@@ -36,14 +24,14 @@ Accounts.onEnrollmentLink((token, done) => {
// ----------------------------------------------------------------------------
// /**
-// * Helpers: Login Form Update Password Overlay
+// * Helpers: Login Form Update Password
// */
-Template.loginFormUpdatePasswordOverlay.helpers({
+Template.loginFormUpdatePassword.helpers({
component() {
- const currentData = Template.currentData() || {};
return {
- ...currentData,
- component: getComponent("UpdatePasswordOverlay")
+ component: getComponent("UpdatePassword"),
+ isOpen: true,
+ type: "updatePassword"
};
}
});
diff --git a/imports/plugins/core/accounts/register.js b/imports/plugins/core/accounts/register.js
index 6621eda1b46..e39215d81e4 100644
--- a/imports/plugins/core/accounts/register.js
+++ b/imports/plugins/core/accounts/register.js
@@ -65,6 +65,13 @@ Reaction.registerPackage({
label: "Profile",
icon: "fa fa-user",
provides: ["userAccountDropdown"]
+ }, {
+ route: "/reset-password/:token/:status?",
+ template: "loginFormUpdatePassword",
+ workflow: "none",
+ meta: { noAdminControls: true },
+ name: "Reset Password",
+ label: "reset-password"
}],
layout: [{
layout: "coreLayout",
diff --git a/imports/plugins/core/accounts/server/methods/sendResetPasswordEmail.js b/imports/plugins/core/accounts/server/methods/sendResetPasswordEmail.js
index bb43c6dc9b5..7ddea0db33b 100644
--- a/imports/plugins/core/accounts/server/methods/sendResetPasswordEmail.js
+++ b/imports/plugins/core/accounts/server/methods/sendResetPasswordEmail.js
@@ -9,6 +9,10 @@ import { Shops } from "/lib/collections";
import Reaction from "/imports/plugins/core/core/server/Reaction";
import ReactionError from "@reactioncommerce/reaction-error";
+Accounts.urls.resetPassword = function reset(token) {
+ return Meteor.absoluteUrl(`reset-password/${token}`);
+};
+
/**
* @method sendResetEmail
* @memberof Core
diff --git a/imports/plugins/core/hydra-oauth/client/containers/auth.js b/imports/plugins/core/hydra-oauth/client/containers/auth.js
index c52f9405d5a..b73435c24fc 100644
--- a/imports/plugins/core/hydra-oauth/client/containers/auth.js
+++ b/imports/plugins/core/hydra-oauth/client/containers/auth.js
@@ -139,7 +139,7 @@ class OAuthFormContainer extends Component {
render() {
return (
-
+
{this.renderAuthView()}
);
diff --git a/imports/plugins/core/hydra-oauth/register.js b/imports/plugins/core/hydra-oauth/register.js
index 426f30a419c..4cd29c5a0a4 100644
--- a/imports/plugins/core/hydra-oauth/register.js
+++ b/imports/plugins/core/hydra-oauth/register.js
@@ -14,7 +14,10 @@ Reaction.registerPackage({
route: "/account/login",
name: "OAuth Login",
label: "oauth-login",
- meta: { oauthLoginFlow: true },
+ meta: {
+ noAdminControls: true,
+ oauthLoginFlow: true
+ },
description: "Oauth Login Provider Page",
workflow: "hydraOauthLogin",
template: "hydraOauthLoginForm"
diff --git a/imports/plugins/core/ui/client/components/app/app.js b/imports/plugins/core/ui/client/components/app/app.js
index a19f2ba9aa8..d1faa9a45d3 100644
--- a/imports/plugins/core/ui/client/components/app/app.js
+++ b/imports/plugins/core/ui/client/components/app/app.js
@@ -47,9 +47,9 @@ class App extends Component {
return this.props.hasDashboardAccess;
}
- get isOauthProvider() {
+ get noAdminControls() {
const currentRoute = this.props.currentRoute.route;
- return currentRoute && currentRoute.options && currentRoute.options.meta && currentRoute.options.meta.oauthLoginFlow;
+ return currentRoute && currentRoute.options && currentRoute.options.meta && currentRoute.options.meta.noAdminControls;
}
handleViewContextChange = (event, value) => {
@@ -115,7 +115,7 @@ class App extends Component {
const { currentRoute } = this.props;
const layout = currentRoute && currentRoute.route && currentRoute.route.options && currentRoute.route.options.layout;
- if (this.isAdminApp && layout !== "printLayout" && !this.isOauthProvider) {
+ if (this.isAdminApp && layout !== "printLayout" && !this.noAdminControls) {
return this.renderAdminApp();
}
diff --git a/imports/plugins/included/default-theme/client/styles/accounts/accounts.less b/imports/plugins/included/default-theme/client/styles/accounts/accounts.less
index c0aba198bcd..fd0d3a6e4e8 100644
--- a/imports/plugins/included/default-theme/client/styles/accounts/accounts.less
+++ b/imports/plugins/included/default-theme/client/styles/accounts/accounts.less
@@ -4,6 +4,9 @@
margin-bottom: 40px;
}
+.idp-form {
+ margin-top: 100px;
+}
// ----------------------------------------------------------------------------
// Login Dropdown
@@ -57,7 +60,7 @@
.profile-image-display-name,
.profile-image-email {
display: block;
- font-size: 1.8rem;
+ font-size: 1.8rem;
margin-top: 10px;
}
diff --git a/private/data/i18n/en.json b/private/data/i18n/en.json
index 60848154620..7e8063f86c8 100644
--- a/private/data/i18n/en.json
+++ b/private/data/i18n/en.json
@@ -641,8 +641,8 @@
"signupCode": "Registration code",
"signUpWithYourEmailAddress": "Register with your email address",
"terms": "Terms of use",
- "updateYourPassword": "Update your password",
- "updatePasswordAndContinue": "Update and continue",
+ "updateYourPassword": "Set New password",
+ "updatePasswordAndContinue": "Update",
"updatedServiceConfiguration": "Updated service configuration for {{service}}",
"username": "Username",
"usernameOrEmail": "Username or email",
@@ -658,6 +658,8 @@
"passwordChanged": "Password changed",
"passwordReset": "Password reset",
"passwordResetSend": "Email with password reset link has been sent.",
+ "passwordResetDone": "Password reset complete.",
+ "passwordResetDoneText": "Please return to app to continue.",
"invitationSent": "Invitation sent",
"sendInvitation": "Send invitation"
},