* Which Category is your question related to? *
Authentication
* What AWS Services are you utilizing? *
Identity Pool; User Pool; Dataset/Storage
* Provide additional details e.g. code snippets *
Our website uses both User Pool (for user management) and Identity Pool (for custom data storage). So we would like to use Amplify to sync the users between them.
I think that we need to sign-in/sign-up users through Identity Pool (via the Cognito identity provider), while we also like to sign-in/sign-up with Google and Facebook. The linking among these confuses me easily.
I found that https://aws-amplify.github.io/docs/js/authentication#federated-identities-social-sign-in:
Availability Note
Currently, our federated identity components only support Google, Facebook and Amazon identities. Please see our Setup Guide for Federated Identities.
Does it mean that we are not able to use Amplify to use Cognito as an identity provider of the Identity Pool?
Currently, we are able to sign in user through Identity Pool:
const FacebookLoginButton = (props) => (
<Button label="LOGIN WITH FACEBOOK" brand="facebook" onClick={props.facebookSignIn} />
);
const federated = {
google_client_id: process.env.GOOGLE_CLIENT_ID,
facebook_app_id: process.env.FACEBOOK_APP_ID,
};
const GoogleLogin = withFederated(GoogleLoginButton);
const FacebookLogin = withFederated(FacebookLoginButton);
...
<FacebookLogin federated={federated} onStateChange={this.handleAuthStateChange}></FacebookLogin>
<GoogleLogin federated={federated} onStateChange={this.handleAuthStateChange}></GoogleLogin>
However, the user is not synced to the User Pool, even though I have added Cognito as an identity provider of the Identity Pool:

Any pointer here? Thanks.
@agongdai There is no relationship between the Authentication provider and the Cognito User Pool. You can set either Cognito User Pool or other providers in the identity pool but users from other identity providers won't be mapped into the Cognito User Pool.
So if you want to login from Cognito User Pool and then get the AWS credentials from the identity pool, you should set Cognito User Pool as one of the provider of the identity pool.
You can also check: https://docs.aws.amazon.com/cognito/latest/developerguide/identity-pools.html
@powerful23 Hi, is there a step by step guide to how properly setup Social Login? I think there are a lot of similar request, but the documentation is not helping much. An example project could be helpful as well.
@nomadus we can provide more details about how to setup Social Login like Google or Facebook if many people don't know how to do that. But for now maybe this link could help you: https://aws-amplify.github.io/docs/js/federated-identity
Closing this issue due to no further response. Feel free to reopen if you still have this issue.
There is a feature in the User Pools called Federation that allows you to add identity providers directly to the user pool. How can we use this feature through amplify?

@mkondel this is to add identity providers in the Cognito Hosted UI: https://aws-amplify.github.io/docs/js/authentication#using-amazon-cognito-hosted-ui
Thank you, @powerful23, I did not understand the connection between "identity providers" and "cognito hosted UI". The site https://aws-amplify.github.io/docs/ is a better source of information for HOW to use cognito features than AWS' own docs.
Most helpful comment
@powerful23 Hi, is there a step by step guide to how properly setup Social Login? I think there are a lot of similar request, but the documentation is not helping much. An example project could be helpful as well.