From the AWS Cognito documents:
AWSCognito.config.region = 'us-east-1';
var poolData = {
UserPoolId : '...', // your user pool id here
ClientId : '...' // your client id here
};
var userPool = new AWSCognito.CognitoIdentityServiceProvider.CognitoUserPool(poolData);
var userData = {
Username : '...', // your username here
Pool : userPool
};
However I do not know which file / where / when to create my instance of the userPool.
It makes sense for me to do it in the app.component.ts, but I am unsure if this is right.
I also don't understand where I import the AWSCognito
function from, I cannot find the right library to do this.
Thank you for any help.