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

Incorrect username/password error is not displayed when using <amplify-authenticator> tag in Angular #4801

Closed
Andrei94 opened this issue Jan 29, 2020 · 5 comments
Labels
Angular Related to Angular 2+ pending-close-response-required A response is required for this issue to remain open, it will be closed within the next 7 days. UI Related to UI Components

Comments

@Andrei94
Copy link

Describe the bug
When trying to login as an nonexistent user using the tag in Angular, the error message is not displayed and the tag disappears from the view.

To Reproduce
Steps to reproduce the behavior:

  1. Configure a user pool with hosted UI
  2. Use the tag for sign in
  3. Try to login with an incorrect user and/or password

Additional context
This seems to come from the fact that inside the aws-ampligy-angular module/sign-in-component-core.ts there the logic

this._show = includes(
			['signIn', 'signedOut', 'signedUp'],
			data.authState.state
		);

When an nonexistent user tries to login, a signIn_failure is returned for authState and hence the tag disappears.
A solution that comes to mind would be to also add this state to the code above.

@Andrei94 Andrei94 added the to-be-reproduced Used in order for Amplify to reproduce said issue label Jan 29, 2020
@ashika01 ashika01 added Angular Related to Angular 2+ UI Related to UI Components and removed to-be-reproduced Used in order for Amplify to reproduce said issue labels Jan 29, 2020
@jordanranz
Copy link
Contributor

Hey @Andrei94, can you elaborate a bit more on the usage of Amplify or aws-amplify-angular in your Angular code?

Are you using the <amplify-authenticator> tag or a different tag?

I attempted to reproduce with an app using <amplify-authenticator></amplify-authenticator> and see the following when trying to sign in with a nonexistent user:

Screen Shot 2020-02-05 at 12 38 47 PM

@Andrei94
Copy link
Author

Andrei94 commented Feb 8, 2020

Sure.
I am using the amplify <amplify-authenticator> tag with the signUp config from the docs.
I tried with Chrome Version 80.0.3987.87 (Official Build) (64-bit) and Firefox 72.0.2 (64-bit) on Windows 10.

This is my sign in page
signIn

This is what happens when I try to sign in when I change the password to be incorrect. The same thing happens when the user doesn't exist

signInFailure

@ericclemmons ericclemmons added this to the UI Components Refactor milestone Feb 15, 2020
@stale
Copy link

stale bot commented Mar 16, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the pending-close-response-required A response is required for this issue to remain open, it will be closed within the next 7 days. label Mar 16, 2020
@stale
Copy link

stale bot commented Mar 23, 2020

This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.

@stale stale bot closed this as completed Mar 23, 2020
@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Angular Related to Angular 2+ pending-close-response-required A response is required for this issue to remain open, it will be closed within the next 7 days. UI Related to UI Components
Projects
None yet
Development

No branches or pull requests

4 participants