1
votes

I've completed the authentication flow for Users using both UserPool and Federated identities of amazon cognito. I can successfully login using my facebook credentials but i'm not able to get the users public profile information.

I have tried to get the user details by calling the function

// Implement callback handler for getting details
    final GetDetailsHandler getDetailsHandler = new GetDetailsHandler() {
        @Override
        public void onSuccess(CognitoUserDetails cognitoUserDetails) {
            // The user detail are in cognitoUserDetails
        }

        @Override
        public void onFailure(Exception exception) {
            // Fetch user details failed, check exception for the cause
        }
    };

cognitoUser.getDetailsInBackground(getDetailsHandler);

But its throwing an exception

User is not authenticated   

Any help is appreciated.

1

1 Answers

0
votes

You mentioned "I can successfully login using my facebook credentials". Did you also login using the Cognito User Pools with username/password? Or did you federate the Facebook user into Cognito User Pool?

Without these two, trying to retrieve user details from Cognito User Pools will fail with this error.