Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login view is disabled after after 2nd time of wrong credentials #21

Closed
haijian-vaadin opened this issue Oct 12, 2020 · 0 comments · Fixed by #22
Closed

Login view is disabled after after 2nd time of wrong credentials #21

haijian-vaadin opened this issue Oct 12, 2020 · 0 comments · Fixed by #22
Assignees
Labels
bug Something isn't working fusion

Comments

@haijian-vaadin
Copy link
Contributor

To reproduce:

  1. Go to localhost:8080
  2. Input a wrong username/password. The login view shows error messages, which is expected
  3. Input a wrong username/password again. The login view is locked, not usable anymore.
    login-error
@haijian-vaadin haijian-vaadin added fusion bug Something isn't working labels Oct 12, 2020
@Haprog Haprog self-assigned this Oct 12, 2020
Haprog added a commit that referenced this issue Oct 12, 2020
On submit the `vaadin-login-form` sets `error` to `false` and `disabled` to `true`. Then the `disabled` status is removed only if `error` is set to `true` (via observer `_errorChanged(error)`).

The issue was that Lit property bindings are one way so when login form sets its internal error status to false, our `login-view` still has `error` `true` (after first login failure) and when we try login for the second time then `this.error = result.error;` doesn't do anything because `this.error` is already `true` (in our view), so it doesn't change and it doesn't trigger the propagation of `error` `true` into login form component.

Fixes #21
haijian-vaadin pushed a commit that referenced this issue Oct 12, 2020
On submit the `vaadin-login-form` sets `error` to `false` and `disabled` to `true`. Then the `disabled` status is removed only if `error` is set to `true` (via observer `_errorChanged(error)`).

The issue was that Lit property bindings are one way so when login form sets its internal error status to false, our `login-view` still has `error` `true` (after first login failure) and when we try login for the second time then `this.error = result.error;` doesn't do anything because `this.error` is already `true` (in our view), so it doesn't change and it doesn't trigger the propagation of `error` `true` into login form component.

Fixes #21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fusion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants