From 741fe20c0afc6e9b48dac1b5af1f16b1ad4119c8 Mon Sep 17 00:00:00 2001 From: David Renshaw Date: Wed, 13 Jan 2016 20:45:12 +0000 Subject: [PATCH 1/2] Display an error message on catching ServiceConfiguation.ConfigError, rather than redirecting to adminSettings. --- shell/packages/sandstorm-accounts-ui/login_buttons.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shell/packages/sandstorm-accounts-ui/login_buttons.js b/shell/packages/sandstorm-accounts-ui/login_buttons.js index 34e43e0370..37571a0f1f 100644 --- a/shell/packages/sandstorm-accounts-ui/login_buttons.js +++ b/shell/packages/sandstorm-accounts-ui/login_buttons.js @@ -69,7 +69,9 @@ var loginResultCallback = function (serviceName, err) { } else if (err instanceof Accounts.LoginCancelledError) { // do nothing } else if (err instanceof ServiceConfiguration.ConfigError) { - Router.go("adminSettings"); + loginButtonsSession.errorMessage( + "The " + serviceName + " login service has a configuration problem (" + err.message + ")." + + "\n\n\n Please contact your server administrator. "); } else { loginButtonsSession.errorMessage(err.reason || "Unknown error"); } @@ -206,6 +208,7 @@ Template.oauthLoginButton.events({ var loginWithService = Meteor[instance.data.data.method]; + var serviceName = instance.data.data.displayName; loginWithService({}, function (err) { loginResultCallback(serviceName, err); }); From 1532b01cb48d8e9dfa373def19106461e1fdc426 Mon Sep 17 00:00:00 2001 From: David Renshaw Date: Fri, 15 Jan 2016 23:33:30 +0000 Subject: [PATCH 2/2] Improve error message wording. --- shell/packages/sandstorm-accounts-ui/login_buttons.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shell/packages/sandstorm-accounts-ui/login_buttons.js b/shell/packages/sandstorm-accounts-ui/login_buttons.js index 37571a0f1f..9ec85a8b19 100644 --- a/shell/packages/sandstorm-accounts-ui/login_buttons.js +++ b/shell/packages/sandstorm-accounts-ui/login_buttons.js @@ -70,8 +70,9 @@ var loginResultCallback = function (serviceName, err) { // do nothing } else if (err instanceof ServiceConfiguration.ConfigError) { loginButtonsSession.errorMessage( - "The " + serviceName + " login service has a configuration problem (" + err.message + ")." + - "\n\n\n Please contact your server administrator. "); + "Configuration problem: " + err.message + ". Please visit the Admin Settings page within " + + "Sandstorm, or ask your administrator to do so. You may need an admin token. Read more by " + + "clicking Troubleshooting below."); } else { loginButtonsSession.errorMessage(err.reason || "Unknown error"); }