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.