question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AmplifyConfirmSignIn - How to call default handleSubmit condition when customizing

See original GitHub issue

Is your feature request related to a problem? Please describe. Per documentation the default handleSubmit will call this.confirmSignup(event)

Screenshot of Google Chrome (9-14-20, 5-33-53 PM)

I would like to do some custom function calls AFTER the user successfully confirms his or her account. I am unable to get access to this.confirmSignup(event) and tried to use the aws-amplify Auth object to call it but that does not work saying I have the wrong parameters. How do I call the parent component (AmplifyConfirmSignIn) handleSubmit function in my custom function and get that return value?

function Root() {
  handleSubmit(event) {
    event.preventDefault();
    // Call this.confirmSignup(event);
    console.log('do custom stuff')
  }

  return (
    <AmplifyAuthenticator>
      <AmplifyConfirmSignIn
        headerText="My Custom Confirm Sign In Text"
        slot="confirm-sign-up"
         handleSubmit={handleSubmit}
      >
      </AmplifyConfirmSignIn>
    </AmplifyAuthenticator>
  )
}

Describe the solution you’d like I think having a ref to this component can be make the parent component function accessible.

Describe alternatives you’ve considered I tried using the aws-amplify library directly but that does not work either.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
humblepiecommented, Dec 2, 2020

The request to be able to access and call the default handler needs to be added to all the handlesubmit events. ie, sign up, sign in, sign out, etc.

Right now if you hook the handlesubmit event you lose the ability to use the base functionality as well.

0reactions
github-actions[bot]commented, May 21, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hope that the Modal component can add a callback ... - GitAnswer
... AmplifyConfirmSignIn - How to call default handleSubmit condition when customizing - amplify-js · gomodifytags Feature Reqest: silent output Go ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found