从 AWS Cognito 文档:
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
};
但是我不知道哪个文件/在哪里/何时创建我的 userPool 实例。
在 app.component.ts 中这样做对我来说是有意义的,但我不确定这是否正确。
我也不明白我AWSCognito
从哪里导入函数,我找不到合适的库来执行此操作。
感谢您的任何帮助。