升级 aws-amplify 软件包时,可能会出现错误,尤其是当手动设置配置而不是放大 cli 的配置时,auth 配置不正确。
So the problem we were facing as we were using manual made config like these:
import Amplify from 'aws-amplify';
Amplify.configure(
Auth: {
identityPoolId: 'XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab', //REQUIRED - Amazon Cognito Identity Pool ID
region: 'XX-XXXX-X', // REQUIRED - Amazon Cognito Region
userPoolId: 'XX-XXXX-X_abcd1234', //OPTIONAL - Amazon Cognito User Pool ID
userPoolWebClientId: 'XX-XXXX-X_abcd1234', //OPTIONAL - Amazon Cognito Web Client ID
},
Storage: {
bucket: '', //REQUIRED - Amazon S3 bucket
region: 'XX-XXXX-X', //OPTIONAL - Amazon service region
}
);
these was working fine in the older version but in aws-amplify^4.3.18 this was breaking. here you can see they say only identityPoolId and region is required but in new version userPoolId and userPoolWebClientId is required to stop the Error
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.