aws-amplify-auth-starters
aws-amplify-auth-starters copied to clipboard
Can I use exsiting cognito pool
I wish to use this but already have a cognito user pool that I want to reuse. Can I attach the existing pool instead of creating one? Specifically, where can I configure the pool name/arn?
Yes, just pass a custom config to your Amplify.configure() found in index.js.
Example:
Amplify.configure({ aws_project_region: "us-east-1", aws_cognito_identity_pool_id: "us-east-1:8xyz", aws_cognito_region: "us-east-1", aws_user_pools_id: "us-east-1_xyz", aws_user_pools_web_client_id: "xyz", Auth: { mandatorySignIn: true, identityPoolId: "us-east-1:xxxxxxxxx", region: "us-east-1", },