angular - (在哪里)在 Angular 8 应用程序中创建 AWS CognitoUserPool
问题描述
从 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
从哪里导入函数,我找不到合适的库来执行此操作。
感谢您的任何帮助。
解决方案
推荐阅读
- apache-nifi - NiFi:持久性目录的变量从字面上实现
- influxdb - Influx 1.8 数据库恢复删除旧数据库
- javascript - 使用 Flask 运行时,我的 JavaScript 代码不起作用
- python - Python:如何打破特殊字符 ' ; '?
- awk - 在 AWK 中循环关联数组时打印空行
- node.js - 类型错误:conn.db 不是函数
- javascript - JavaScript `reduce` 在尝试对简单浮点数求和时产生 NaN
- python-3.x - ParameterGrid 是否产生重复项?
- python-3.x - 使用 pandas pivot 时有没有办法避免重复问题?
- angular - nginx中的角度路由问题