登录后放大存储工作一次,但无法刷新页面

时间:2019-03-22 19:45:40

标签: node.js angular aws-amplify

我正在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
  }
});

0 个答案:

没有答案