Closed orestesgaolin closed 1 year ago
I hope official documentation will help you https://docs.aws.amazon.com/cognito/latest/developerguide/google.html
I'm not sure if I follow but based on the docs you linked it looks like we end up at the same stage i.e. I get the AWS credentials, by calling:
await _credential.getAwsCredentials(
idToken,
'accounts.google.com',
);
and this is essentially the same as JS:
// Obtain AWS credentials
AWS.config.credentials.get(function(){
// Access AWS resources here.
});
Do I understand correctly, that from this point on I'm authenticated and should use Google Sign In status to determine the session status?
Please try on this step:
final user = CognitoUser(
'xxx',
_userPool,
signInUserSession: session,
);
change your 'xxx'
to null
.
@orestesgaolin Did @furaiev 's solution resolve this? I am just about to start using this but want to know.
Nope, doesn't work for now
is there any update on this issue? I'm facing the same problem.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
I'm trying to use Google Sign In through Open Id Connect provider together with Cognito. I'm able to get the
CognitoCredentials
more or less like this:At this stage credentials object contains all the fields.
However, I'm not sure how to create and authenticate the
CognitoUser
having this data. When callingThe last call fails with
User is not authenticated
exception.Is there something obvious I'm missing? How to get the authenticated
CognitoUser
?