Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/backend/src/couchers/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
"invalid_name": "Name not supported.",
"invalid_notification_preference": "Invalid notification preference.",
"invalid_password": "Wrong password.",
"invalid_password_login": "Wrong username/email or password.",
"invalid_phone": "Phone number must be in international format without punctuation.",
"invalid_recipients": "Invalid recipients list.",
"invalid_region": "Invalid region.",
Expand Down
2 changes: 1 addition & 1 deletion app/backend/src/couchers/servicers/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def Authenticate(self, request: auth_pb2.AuthReq, context: CouchersContext, sess
else:
logger.debug("Wrong password")
# wrong password
context.abort_with_error_code(grpc.StatusCode.NOT_FOUND, "invalid_password")
context.abort_with_error_code(grpc.StatusCode.NOT_FOUND, "invalid_password_login")
else: # user not found
# check if this is an email and they tried to sign up but didn't complete
signup_flow = session.execute(
Expand Down
6 changes: 3 additions & 3 deletions app/backend/src/tests/test_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def test_ChangePasswordV2_normal_wrong_password(db, fast_passwords):
with pytest.raises(grpc.RpcError) as e:
account.ChangePasswordV2(
account_pb2.ChangePasswordV2Req(
old_password="wrong password",
old_password="Wrong password",
new_password=new_password,
)
)
Expand Down Expand Up @@ -319,7 +319,7 @@ def test_ChangeEmailV2_wrong_password(db, fast_passwords):
with pytest.raises(grpc.RpcError) as e:
account.ChangeEmailV2(
account_pb2.ChangeEmailV2Req(
password="wrong password",
password="Wrong password",
new_email=new_email,
)
)
Expand All @@ -346,7 +346,7 @@ def test_ChangeEmailV2_wrong_email(db, fast_passwords):
with pytest.raises(grpc.RpcError) as e:
account.ChangeEmailV2(
account_pb2.ChangeEmailV2Req(
password="wrong password",
password="Wrong password",
new_email=new_email,
)
)
Expand Down
2 changes: 1 addition & 1 deletion app/backend/src/tests/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ def test_unsuccessful_authenticate(db):
with pytest.raises(grpc.RpcError) as e:
reply = auth_api.Authenticate(auth_pb2.AuthReq(user=user.username, password="incorrectpassword"))
assert e.value.code() == grpc.StatusCode.NOT_FOUND
assert e.value.details() == "Wrong password."
assert e.value.details() == "Wrong username/email or password."

# Invalid username
with auth_api_session() as (auth_api, metadata_interceptor):
Expand Down
Loading