Chaincase-iOS-Beta icon indicating copy to clipboard operation
Chaincase-iOS-Beta copied to clipboard

refactor login flow

Open Kukks opened this issue 4 years ago • 2 comments

Makes the login flow use form submission. Also updated password component to use the same base classes of Blazor Ionic, while also making the shake feature built on to the validation engine + submission.

https://docs.microsoft.com/en-us/aspnet/core/blazor/forms-validation?view=aspnetcore-6.0

Kukks avatar Nov 22 '21 10:11 Kukks

I really tried to understand this pull request but I don't. I understand why form submissions make sense in an http app but not here.

Why do we need data annotations validation? This is password submission, not checking if a name is < 10 characters. Why wouldn't form submission alone be sufficient?

As tested in iOS merged with master,

  • It doesn't accept a valid password (Because Password is no longer bound in the SubmitPassword() Scope
  • an Invalid password doesn't shake any longer (How would you do this without waiting for the result from the keystore validation?)
  • after entering an invalid password the "Log in" button is disabled permanently
  • if you had an invalid password you used to be able to hit delete once and it would clear the field. This removes that

DanGould avatar Dec 19 '21 07:12 DanGould

it shakes once on bad password then gets in a state where it won't shake anymore

DanGould avatar Dec 21 '21 12:12 DanGould