adjust forgot password text to specify that you must use the website - fixes https://github.com/HabitRPG/habitrpg-android/issues/170

This commit is contained in:
Alys
2015-12-11 06:39:03 +10:00
parent 33f5dda99a
commit cf01376f7d
2 changed files with 3 additions and 3 deletions

View File

@@ -37,7 +37,7 @@ describe('front page', function() {
var login = element(by.css("#loginForm input[value='Login']")); var login = element(by.css("#loginForm input[value='Login']"));
login.click(); login.click();
var alertDialog = browser.switchTo().alert(); var alertDialog = browser.switchTo().alert();
expect(alertDialog.getText()).toMatch("Uh-oh - your username or password is incorrect.\n- Make sure your username or email is typed correctly.\n- You may have signed up with Facebook, not email. Double-check by trying Facebook login.\n- If you forgot your password, click \"Forgot Password\"."); expect(alertDialog.getText()).toMatch("Uh-oh - your username or password is incorrect.\n- Make sure your username or email is typed correctly.\n- You may have signed up with Facebook, not email. Double-check by trying Facebook login.\n- If you forgot your password, click \"Forgot Password\" on the habitica.com website's login form.");
alertDialog.accept(); alertDialog.accept();
}); });

View File

@@ -156,7 +156,7 @@ api.loginLocal = function(req, res, next) {
User.findOne(login, {auth:1}, function(err, user){ User.findOne(login, {auth:1}, function(err, user){
if (err) return next(err); if (err) return next(err);
if (!user) return res.json(401, {err:"Uh-oh - your username or password is incorrect.\n- Make sure your username or email is typed correctly.\n- You may have signed up with Facebook, not email. Double-check by trying Facebook login.\n- If you forgot your password, click \"Forgot Password\"."}); if (!user) return res.json(401, {err:"Uh-oh - your username or password is incorrect.\n- Make sure your username or email is typed correctly.\n- You may have signed up with Facebook, not email. Double-check by trying Facebook login.\n- If you forgot your password, click \"Forgot Password\" on the habitica.com website's login form."});
if (user.auth.blocked) return res.json(401, accountSuspended(user._id)); if (user.auth.blocked) return res.json(401, accountSuspended(user._id));
// We needed the whole user object first so we can get his salt to encrypt password comparison // We needed the whole user object first so we can get his salt to encrypt password comparison
User.findOne( User.findOne(
@@ -164,7 +164,7 @@ api.loginLocal = function(req, res, next) {
, {_id:1, apiToken:1} , {_id:1, apiToken:1}
, function(err, user){ , function(err, user){
if (err) return next(err); if (err) return next(err);
if (!user) return res.json(401,{err:"Uh-oh - your username or password is incorrect.\n- Make sure your username or email is typed correctly.\n- You may have signed up with Facebook, not email. Double-check by trying Facebook login.\n- If you forgot your password, click \"Forgot Password\"."}); if (!user) return res.json(401,{err:"Uh-oh - your username or password is incorrect.\n- Make sure your username or email is typed correctly.\n- You may have signed up with Facebook, not email. Double-check by trying Facebook login.\n- If you forgot your password, click \"Forgot Password\" on the habitica.com website's login form."});
res.json({id: user._id,token: user.apiToken}); res.json({id: user._id,token: user.apiToken});
password = null; password = null;
}); });