amazon-archives / amazon-cognito-identity-js

Amazon Cognito Identity SDK for JavaScript
Other
984 stars 454 forks source link

Where does 'IdentityPoolId' come from if you don't have federated identities #663

Closed stevewillard closed 6 years ago

stevewillard commented 6 years ago

In the following:

 AWS.config.credentials = new AWS.CognitoIdentityCredentials({
                IdentityPoolId : '...', // your identity pool id here
                Logins : {
                    // Change the key below according to the specific region your user pool is in.
                    'cognito-idp.<region>.amazonaws.com/<YOUR_USER_POOL_ID>' : result.getIdToken().getJwtToken()
                }
            });

Where does IdentityPoolId come from? How can I retrieve that from the console/cli? I don't want to use Google/FB or any other provider - I just want to use Cognito to authenticate, and then use the aws-sdk.

stevewillard commented 6 years ago

Oh man, I spent way too long looking for this. Apparently, I kept bypassing the UI in the console where you could create identity pools (it kept just bringing me to user pools management). For those of you struggling with this, make sure to re-log in back to Cognito and click the right button:

screen shot 2018-01-25 at 2 41 32 pm