HomeiOS DevelopmentAWS Cognito Identification Pool: InvalidIdentityPoolConfigurationException when utilizing Google ID token from React...

AWS Cognito Identification Pool: InvalidIdentityPoolConfigurationException when utilizing Google ID token from React Native iOS app


I’m making an attempt to authenticate customers through Google in my React Native iOS app, then confirm the ID token in AWS Cognito to imagine a job and entry AWS sources.

Right here’s my setup:

  1. Google OAuth 2.0 Purchasers:

One for Net

One for iOS

  1. Cognito Identification Pool:

Authentication supplier: accounts.google.com

iOS shopper ID configured in iosClientId discipline

Function choice: default position

Declare mapping: Default mappings

IAM Function Belief Coverage:

{
    "Model": "2012-10-17",
    "Assertion": [
        {
            "Effect": "Allow",
            "Principal": {
                "Federated": "cognito-identity.amazonaws.com"
            },
            "Action": "sts:AssumeRoleWithWebIdentity",
            "Condition": {
                "StringEquals": {
                    "cognito-identity.amazonaws.com:aud": "us-east-1:"
                },
                "ForAnyValue:StringLike": {
                    "cognito-identity.amazonaws.com:amr": "authenticated"
                }
            }
        }
    ]
}
  1. ID Token from React Native iOS app (decoded):
{
  "iss": "https://accounts.google.com",
  "azp": "",
  "aud": "",
  "sub": "xxxxxxx",
  "e mail": "[email protected]",
  "email_verified": true,
  "at_hash": "xxxxxx",
  "nonce": "xxxxx",
  "title": "xxxxx",
  "image": "https://lh3.googleusercontent.com/a/xxxx",
  "given_name": "xxx",
  "family_name": "xxx",
  "iat": 1756173447,
  "exp": 1756177047
}
  1. Testing with AWS CLI:
aws cognito-identity get-credentials-for-identity 
    --identity-id us-east-1: 
    --logins "accounts.google.com="

Noticed habits:

A brand new Cognito Identification is created within the console when run above cli however fails with:

An error occurred (InvalidIdentityPoolConfigurationException) when calling the GetCredentialsForIdentity operation: Invalid id pool configuration. Test assigned IAM roles for this pool.

Query:
What may trigger InvalidIdentityPoolConfigurationException on this situation? Request assist resolving this. Thanks prematurely.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments