我正在Angular 6应用中初始化AWS Amplify Service。具有身份验证和存储功能。 我第一次登录时工作正常。但在页面刷新时,存储区会在任何调用中返回403禁止访问。
这是放大的配置
const {IdentityPoolId,
UserPoolClientId,
UserPoolId,
Region,
AssetsBucket} = response['config'];
this.isAmplifyConfigured = true;
Amplify.configure({
mandatorySignIn: false,
Auth: {
mandatorySignIn: true,
region: Region,
userPoolId: UserPoolId,
identityPoolId: IdentityPoolId,
userPoolWebClientId: UserPoolClientId,
authenticationFlowType: 'USER_PASSWORD_AUTH'
},
Storage: {
bucket: AssetsBucket,
region: Region
}
});