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.

Getting onClick events from the <Authenticator> component

See original GitHub issue

** Which Category is your question related to? ** Using aws-amplify-react’s <Authenticator> component.

** What AWS Services are you utilizing? ** Cognito with both user and identity pools for login.

** Provide additional details e.g. code snippets ** This is in my render():

<Authenticator
  onStateChange={ respondToAuthStateChange } 
/>

I would like to know when a user clicks on the SignIn button. The onStateChange method only runs after the authentication attempt. I want to show a loading indicator while this is happening.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jordanranzcommented, May 9, 2019

Correct, you could listen to the state change with Hub. It would be an API specific loading event. For example, when clicking the Sign In button exemplified above, it executes Auth.signIn and would trigger an event like signIn-loading on the ‘auth’ channel.

0reactions
github-actions[bot]commented, Jun 18, 2021

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

Figma-to-Code (React) - UI event handler - AWS Amplify Docs
UI event handler ... Amplify Studio offers the ability to bind UI component events ( onClick , onChange , and more) to actions...
Read more >
React's onClick Event Handler Explained - OpenReplay Blog
The React onClick event handler enables you to call a function and trigger an action when a user clicks an element, such as...
Read more >
Is there a way to add onClick event to a custom component
I have 2 kinds of buttons, a normal html button and another custom button. I can use onClick only on ...
Read more >
Amplify UI's new Authenticator component makes it easy to ...
In this blog post we will deploy a React app with Amplify Hosting, set up auth, and then integrate the <Authenticator> UI component...
Read more >
Component Events and Actions - Ignition User Manual 8.1
Mouse Event. onClick events occur when the user clicks on any of their mouse's buttons, while the cursor is hovered over the component....
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