Currently working in an angular app. I am trying to use Cognito as authentication service.
From my terminal in VCode and using Amplify CLI I created the user pool and as the documentation says , Amplify created a aws-export.js file. In AWS account I was able to check all the settings created from my terminal
Here is the aws-export.js file inserted in my app folder structure by amplify
const awsmobile = {
"aws_project_region": "us-east-2",
"aws_cognito_identity_pool_id": "us-east-2:THE_USER_POOL",
"aws_cognito_region": "us-east-2",
"aws_user_pools_id": "us-east-2_SOME_STRING",
"aws_user_pools_web_client_id": "THE_CLIENT_ID_HERE",
"oauth": {
"domain": "A_STRING_SIMILAR_TO_USER_POOL-test.auth.us-east-2.amazoncognito.com",
"scope": [
"phone",
"email",
"openid",
"profile",
"aws.cognito.signin.user.admin"
],
"redirectSignIn": "http://localhost:4200/",
"redirectSignOut": "http://localhost:4200/login/",
"responseType": "code"
},
"federationTarget": "COGNITO_USER_POOLS"
};
export default awsmobile;
Now I want same application to change from the initial user pool to another user pool in another region and cannot find any command in amplify to do that.
AWS doc only mention here at the end close to NEXT STEPS https://aws-amplify.github.io/docs/js/start?platform=angular
that when AWS resource exist, the main.ts file should be modified manually.
So does the aws-export.js no longer is useful?
Are there ways to connect the app to different Cognito user pool that does not have a backend?
I only want to use same angular app and change to another user pool but still be able to use amplify for changes that I might need to add in the configuration of the Amplify.configure like changing redirect URLs but using amplify commands (push, pull, etc.)