mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
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:
@@ -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();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user