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.

Hub 'auth' channel 'signIn' event is not invoked if account has temporary password.

See original GitHub issue

Describe the bug The ‘signIn’ event is not invoked on the ‘auth’ channel when using Hub.listen(‘auth’, () => { }) if the user account being used to sign in has the ‘FORCE_CHANGE_PASSWORD’ status

To Reproduce Steps to reproduce the behavior:

  1. Register a new listener: Hub.listen('auth', data => {console.log(data.payload.event})
  2. Create a new user using the Amazon Cognito Admin panel; notice this new user’s account status is ‘FORCE_CHANGE_PASSWORD’
  3. Auth.signIn() will not invoke the log if the admin-created user is used

Expected behavior The event ‘signIn’ should be invoked on the ‘auth’ listener channel

Versions Amplify version 4.32.0 Node version 14.4.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
amhinsoncommented, Nov 9, 2020

I did notice one thing though: ${user} has signed in is being rendered as [object Object] should probably change to match the message from the second snippet A user ${user.getUsername()} has been signed in as user is of type CognitoUser

Yep, good catch @wei! That seems like an appropriate update to make 👍

0reactions
github-actions[bot]commented, Nov 25, 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

Authentication - Password & user management - JavaScript
It will throw an error if there is no user logged in. This method should be called after the Auth module is configured...
Read more >
Amplify Hub.listen immediately calls signOut after signIn when ...
I have SSO working fine, however, when trying to put the cognito user object in my authentication context, Hub.listen calls a signout and ......
Read more >
What is SSO? | How single sign-on works - Cloudflare
With SSO, a user only has to enter their login credentials (username, password, etc.) one time on a single page to access all...
Read more >
Service accounts | IAM Documentation | Google Cloud
Service accounts do not have passwords, and cannot log in via browsers or cookies. ... If you share Google Workspace assets, like docs...
Read more >
Login Security and Help | American Express® Savings Account
An email will be sent within 10 minutes with the subject line “Temporary code request for account access”. If you do not see...
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