Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSign in event gets registered multiple times when using regular Auth.signIn() #6069
Comments
|
I'm seeing a possibly related issue, our Cognito Pre Token Generation lambda function was triggered 82 times in less than a second for the same user. |
|
I see this issue too..specially on android when using social federated sign up |
|
Since i had business logic that was being called many times my workaround was to move the business logic out from Hub.listen and add another middle layer where my business logic gets executed. Sign in event in Hub.listen would redirect the user to the middle layer where my business logic gets executed and which then redirects to the appropriate screen. |
|
I also have the same problem. The sign event is called multiple time when login The code is quite simple
|



Describe the bug
When a user signs in using Auth.signIn() the "signIn" event is registered multiple times in the Hub listener
To Reproduce
Expected behavior
The sign in event should only happen once - im bypassing this by keeping track of page loads. :\
Code Snippet
Screenshots

