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

facing issue in forgotPassword state of Authenticator component #6300

Closed
tankvishal324 opened this issue Jan 16, 2025 · 3 comments
Closed

facing issue in forgotPassword state of Authenticator component #6300

tankvishal324 opened this issue Jan 16, 2025 · 3 comments
Labels
pending-maintainer-response Issue is pending response from an Amplify UI maintainer question General question

Comments

@tankvishal324
Copy link

tankvishal324 commented Jan 16, 2025

i'm using customize Authenticator to given follow,

const formFields: any = {
   forgotPassword: {
        username: {
          label: 'Email ID/ Mobile Number',
          placeholder: 'Enter Email ID/ Mobile Number',
        },
      },
}

const components = {
 ForgotPassword: {
      Header() {
        const { tokens } = useTheme();
        return (
          <div className="pb-10 lg:hidden">
            <Heading textAlign="center" level={3}>
              Forgot Password?
            </Heading>
            <p className="text-lg font-medium text-[#22222299] text-center">
              Please enter your registered email or <br /> mobile number to
              reset your password.
            </p>
          </div>
        );
      },
    },
}

   <Authenticator
      initialState="signUp"
      formFields={formFields}
      components={components}
      services={{}}
      socialProviders={['google', 'facebook', 'apple']}
    />

I want to add client-side validation to the forgotPassword field, such as validating email and phone number. If anyone has a solution for this, please provide it. I am strictly adhering to the mentioned customization approach because all the Authenticator components are using the same method.

@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending response from an Amplify UI maintainer labels Jan 16, 2025
@cwomack cwomack added question General question and removed pending-triage Issue is pending triage labels Jan 16, 2025
@cwomack
Copy link
Member

cwomack commented Jan 17, 2025

Hello, @tankvishal324 and thanks for opening this issue. We have an existing feature request (#3463) to capture adding custom event validation for specific fields in the Authenticator component. So while there's no out of the box support for this right now, we can try to answer the question regarding how you can go about doing this still.

I think you've already seen the customization docs and related MDN docs that we link, but essentially you'd have to create your own custom forgotPassword component since the built-in form field customization doesn't currently support custom validation rules. We'll close this issue out as a duplicate of the feature request linked above, but feel free to add a comment/"+1" on that issue to help it gain traction. Thanks!

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify UI maintainer label Jan 17, 2025
@cwomack cwomack added the pending-community-response Issue is pending response from the issue requestor or other community members label Jan 17, 2025
@github-actions github-actions bot removed the pending-community-response Issue is pending response from the issue requestor or other community members label Jan 17, 2025
@tankvishal324 tankvishal324 reopened this Jan 17, 2025
@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending response from an Amplify UI maintainer labels Jan 17, 2025
@cwomack cwomack removed pending-triage Issue is pending triage pending-maintainer-response Issue is pending response from an Amplify UI maintainer labels Jan 17, 2025
@cwomack
Copy link
Member

cwomack commented Jan 22, 2025

@tankvishal324, did you mean to open the issue again? If not we'll close but wanted to make sure. Thanks!

@tankvishal324
Copy link
Author

i'm going with customization not get any other solution. Thanks for Suggestion

@github-actions github-actions bot added the pending-maintainer-response Issue is pending response from an Amplify UI maintainer label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-maintainer-response Issue is pending response from an Amplify UI maintainer question General question
Projects
None yet
Development

No branches or pull requests

2 participants