aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.43k stars 2.13k forks source link

Amplify currentUserinfo returns null #4197

Closed jmandivarapu1 closed 4 years ago

jmandivarapu1 commented 5 years ago

Note: If your issue/bug is regarding the AWS Amplify Console service, please log it in the Amplify Console GitHub Issue Tracker

Describe the bug When I used authenticationFlowType: 'USER_PASSWORD_AUTH' in my configuration of amplify. After I signin with my usrname and password then Auth.currentUserInfo() is returning null.

I doubled checked it. If I remove authenticationFlowtype it shows all the user properties

To Reproduce Steps to reproduce the behavior:

  1. Go to 'config file and add authenticationFlowType: 'USER_PASSWORD_AUTH''
  2. check on '.Auth.currentUserInfo()'
  3. See Null

Expected behavior It should return user attributes

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.