scientifichackers / flutter_cognito_plugin

An AWS cognito plugin for flutter
GNU Lesser General Public License v3.0
60 stars 28 forks source link

Federated SignIn with Google Sign In return error #28

Open ZLemingli360 opened 4 years ago

ZLemingli360 commented 4 years ago

Hi,

I'm using this code

var res = await Cognito.federatedSignIn('accounts.google.com', token.idToken);

and I receive error "Token is not from a supported provider of this identity pool" but I've checked my user pool>Identity provider and identity pool>authentication provider both are configured.

May I know what might be the reason that I'm getting this error? Do I need to add google info into the awsconfiguration.json as well?If yes can anyone please show me the sample. Thanks! Below are the awsconfiguration.json sample I'm using

{ "IdentityManager": { "Default": {} }, "CredentialsProvider": { "CognitoIdentity": { "Default": { "PoolId": "XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab", "Region": "XX-XXXX-X" } } }, "CognitoUserPool": { "Default": { "PoolId": "XX-XXXX-X_abcd1234", "AppClientId": "XXXXXXXX", "AppClientSecret": "XXXXXXXXX", "Region": "XX-XXXX-X" } } }

ignaciolopez12 commented 4 years ago

same error