HomePhabricator
Diffusion Comm ce7bc1377e20

[web][native][keyserver] Changing login screen so it displays identical error…

Description

[web][native][keyserver] Changing login screen so it displays identical error on wrong username and/or password.

Summary:
Solving issue: https://linear.app/comm/issue/ENG-2047/[web]-[native][keyserver][security]-on-login-wrong-user-and-wrong
Keyserver returns only "invalid_parameters" instead of either "invalid_parameters" or "invalid_credentials". So it is impossible to say which of the fields was wrong based on the error.
As Tomek mentioned it is still possible to perform timing attack but it will be taken care of in another issue on Linear. On web and native we are reacting to "invalid_parameters" displaying message about incorrect credentials, not specifying which one was incorrect.

Screenshot 2022-10-14 at 14.55.35.png (340×606 px, 116 KB)

Screenshot 2022-10-14 at 14.55.12.png (538×492 px, 33 KB)

Test Plan:
Built app.
Tested all scenarios and verified that correct thing is displayed.

Reviewers: tomek, ashoat, kamil, atul

Reviewed By: tomek, ashoat

Subscribers: abosh, atul, kamil, ashoat, tomek

Differential Revision: https://phab.comm.dev/D5368