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

Showing Passoword in the place of Email #5363

Open
4 tasks done
VivekS98 opened this issue Jul 3, 2024 · 12 comments
Open
4 tasks done

Showing Passoword in the place of Email #5363

VivekS98 opened this issue Jul 3, 2024 · 12 comments
Assignees
Labels
Authenticator An issue or a feature-request for an Authenticator UI Component being-investigated An issue or a feature-request is being investigated not-reproducible Not able to reproduce the issue pending-community-response Issue is pending response from the issue requestor or other community members pending-response Issue is pending response from the issue requestor question General question React An issue or a feature-request for React platform

Comments

@VivekS98
Copy link

VivekS98 commented Jul 3, 2024

Before creating a new issue, please confirm:

On which framework/platform are you having an issue?

React

Which UI component?

Authenticator

How is your app built?

NextJS

What browsers are you seeing the problem on?

Firefox

Which region are you seeing the problem in?

India (Banglore)

Please describe your bug.

After Signin, a verification step is shown, where instead of email or username it shows password which should never happen. If we are using username for Signup, then it should use another way to verify, but not show the passoword directly.
Screenshot 2024-07-03 at 13-50-53 RadiXplore v3

What's the expected behaviour?

If the Auth happens via username, then in the verification step, it must ask for email or phone number for verification. Or there must be a way to disable the verification step.

Help us reproduce the bug!

Try signing up and signing in through the Amplify UI. After a successful singnin, it shows a verification step where it shows password instead of the email.

Code Snippet

import React from 'react';
import { Amplify } from 'aws-amplify';

import { Authenticator } from '@aws-amplify/ui-react';
import '@aws-amplify/ui-react/styles.css';

import awsExports from './aws-exports';
Amplify.configure(awsExports);

export default function App() {
  return (
    <Authenticator>
      {({ signOut, user }) => (
        <main>
          <h1>Hello {user.username}</h1>
          <button onClick={signOut}>Sign out</button>
        </main>
      )}
    </Authenticator>
  );
}

Console log output

Screenshot 2024-07-03 at 13-50-53 RadiXplore v3

Additional information and screenshots

No response

@github-actions github-actions bot added the pending-triage Issue is pending triage label Jul 3, 2024
@VivekS98 VivekS98 changed the title Showing Passowrd in the place of Email Showing Passoword in the place of Email Jul 3, 2024
@esauerbo esauerbo added Authenticator An issue or a feature-request for an Authenticator UI Component being-investigated An issue or a feature-request is being investigated React An issue or a feature-request for React platform labels Jul 3, 2024
@esauerbo
Copy link
Contributor

esauerbo commented Jul 3, 2024

@VivekS98 I wasn't able to reproduce this with @aws-amplify/[email protected] (latest). What version are you using? Can you also provide your amplify configuration (minus any sensitive information)?

@esauerbo esauerbo added pending-response Issue is pending response from the issue requestor not-reproducible Not able to reproduce the issue and removed pending-triage Issue is pending triage labels Jul 3, 2024
@esauerbo esauerbo self-assigned this Jul 3, 2024
@esauerbo
Copy link
Contributor

@VivekS98 are you still experiencing this issue?

@VivekS98
Copy link
Author

@esauerbo yes. With the same configuration

@esauerbo
Copy link
Contributor

Can you provide the information from my earlier comment? We haven't been able to reproduce this.

@VivekS98
Copy link
Author

Can you please mention which configuration exactly you need?

@esauerbo
Copy link
Contributor

esauerbo commented Jul 19, 2024

@VivekS98 whatever you're calling Amplify.configure with, which looks like aws-exports in your case. And can you tell us what version of @aws-amplify/ui-react are you using? Your package.json may also be helpful.

@VivekS98
Copy link
Author

Here is the aws-exports


const awsmobile: any = {
  aws_project_region: awsExports.APP_AWS_REGION,
  aws_cognito_identity_pool_id: awsExports.APP_IDENTITY_POOL_ID,
  aws_cognito_region: awsExports.APP_AWS_REGION,
  aws_user_pools_id: awsExports.APP_USER_POOL_ID,
  aws_user_pools_web_client_id: awsExports.APP_USER_POOL_WEB_CLIENT_ID,
};

export default awsmobile;

package.json

"@aws-amplify/ui-react": "^6.1.12",
"aws-amplify": "^6.3.8"

@thaddmt
Copy link
Member

thaddmt commented Jul 24, 2024

Is the string that's being returned censored? Like in the screenshot I have posted below?
Screenshot 2024-07-24 at 10 17 56 AM

I tried copying your aws-exports and your sample code and I was not able to reproduce returning a password from the sign up.

I also tried using the useAuthenticator hook to print out the unverifiedUserAttributes to print out the values, could you try doing that and let us know if password is being printed there? You can try using an app similar to my example posted below.

The following should wrap your application in an AuthenticatorProvider and will use the useAuthenticator hook so you can inspect the values as you go through the auth flow

function App() {
  const { unverifiedUserAttributes } = useAuthenticator((context) => [context.unverifiedUserAttributes]);
  console.log(JSON.stringify(unverifiedUserAttributes));
  return (
    <Authenticator>
      {({ signOut, user }) => (
        <main>
          <h1>Hello {user.username}</h1>
          <button onClick={signOut}>Sign out</button>
        </main>
      )}
    </Authenticator>
  );
}

export default function ProviderWrappedApp() {
  return (
    <Authenticator.Provider>
      <App />
    </Authenticator.Provider>
  );
}

@reesscot
Copy link
Member

Hi @VivekS98, are you still experiencing this issue?

@VivekS98
Copy link
Author

Yes

@VivekS98
Copy link
Author

What happened is this:
I was sent an invite which I used to sign up and create a password. It's that created password which is showing up as email.

@esauerbo
Copy link
Contributor

@VivekS98 can you please respond to @thaddmt's comment? #5363 (comment) It would be helpful to know whether your password shows up in unverifiedUserAttributes.

@jordanvn jordanvn added pending-community-response Issue is pending response from the issue requestor or other community members question General question labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Authenticator An issue or a feature-request for an Authenticator UI Component being-investigated An issue or a feature-request is being investigated not-reproducible Not able to reproduce the issue pending-community-response Issue is pending response from the issue requestor or other community members pending-response Issue is pending response from the issue requestor question General question React An issue or a feature-request for React platform
Projects
None yet
Development

No branches or pull requests

5 participants