aws-amplify

How to do field level @auth for bi-directional one-to-many @connection with AppSync GraphQL Transform?

只谈情不闲聊 提交于 2020-12-12 04:41:34
问题 I'm trying to figure out how can you protect at field level a one-to-many @connection with @auth against mutations that shouldn't be allowed. (ie: deny a specific user to run a mutation that will end-up inserting posts as another user.) Starting with the example for protecting a mutation at the field level: https://aws-amplify.github.io/docs/cli/graphql#field-level-authorization I tried doing something like this: type User @model @auth(rules: [{ allow: owner, ownerField: "id" }]) { id: ID!

AWS Amplify MissingRequiredParameter userId error

半城伤御伤魂 提交于 2020-12-10 20:47:50
问题 I'm following the guide for starting with Interactions. When I call the send method on Interactions, I get the following error: (node:27796) UnhandledPromiseRejectionWarning: MissingRequiredParameter: Missing required key 'userId' in params It looks like Interactions is expecting a userId param, which in @aws-amplify/interactions/lib/Providers/AWSLexProvider.js , is supposed to be pulled from credentials.identityId . However, when I log credentials , it is type SharedIniFileCredentials ,

AWS Amplify MissingRequiredParameter userId error

余生长醉 提交于 2020-12-10 20:46:12
问题 I'm following the guide for starting with Interactions. When I call the send method on Interactions, I get the following error: (node:27796) UnhandledPromiseRejectionWarning: MissingRequiredParameter: Missing required key 'userId' in params It looks like Interactions is expecting a userId param, which in @aws-amplify/interactions/lib/Providers/AWSLexProvider.js , is supposed to be pulled from credentials.identityId . However, when I log credentials , it is type SharedIniFileCredentials ,

AWS Amplify MissingRequiredParameter userId error

自古美人都是妖i 提交于 2020-12-10 20:44:33
问题 I'm following the guide for starting with Interactions. When I call the send method on Interactions, I get the following error: (node:27796) UnhandledPromiseRejectionWarning: MissingRequiredParameter: Missing required key 'userId' in params It looks like Interactions is expecting a userId param, which in @aws-amplify/interactions/lib/Providers/AWSLexProvider.js , is supposed to be pulled from credentials.identityId . However, when I log credentials , it is type SharedIniFileCredentials ,

How to change Node Version in Provision Step in Amplify Console

白昼怎懂夜的黑 提交于 2020-12-04 15:53:29
问题 I'm facing the problem that I cant build my Angular app through the AWS Amplify Console: "You are running version v8.12.0 of Node.js, which is not supported by Angular CLI 8.0+. The official Node.js version that is supported is 10.9 or greater. Please visit https://nodejs.org/en/ to find instructions on how to update Node.js." Now I want to set the default node version of the docker container in the provision step to VERSION_NODE_10 which is already defined in the container. # Framework

how handle refresh token service in AWS amplify-js

孤街醉人 提交于 2020-12-04 10:02:44
问题 In my react project I am using AWS Cognito user pool for user management, for user authentication, I am using AWS Cognito idToken. after 90min the session will expire, then I need to refresh with new idToken. how to handle the refresh token service in AWS Cognito using amplify-js. I tried with Auth.currentSession() I will call this for every 1 hour but it's not working for me. 回答1: After a long struggle, I found the solution to update the AWS Cognito refresh token, To do this I am using the

how handle refresh token service in AWS amplify-js

♀尐吖头ヾ 提交于 2020-12-04 10:01:24
问题 In my react project I am using AWS Cognito user pool for user management, for user authentication, I am using AWS Cognito idToken. after 90min the session will expire, then I need to refresh with new idToken. how to handle the refresh token service in AWS Cognito using amplify-js. I tried with Auth.currentSession() I will call this for every 1 hour but it's not working for me. 回答1: After a long struggle, I found the solution to update the AWS Cognito refresh token, To do this I am using the

how handle refresh token service in AWS amplify-js

廉价感情. 提交于 2020-12-04 10:00:16
问题 In my react project I am using AWS Cognito user pool for user management, for user authentication, I am using AWS Cognito idToken. after 90min the session will expire, then I need to refresh with new idToken. how to handle the refresh token service in AWS Cognito using amplify-js. I tried with Auth.currentSession() I will call this for every 1 hour but it's not working for me. 回答1: After a long struggle, I found the solution to update the AWS Cognito refresh token, To do this I am using the

how handle refresh token service in AWS amplify-js

邮差的信 提交于 2020-12-04 09:59:57
问题 In my react project I am using AWS Cognito user pool for user management, for user authentication, I am using AWS Cognito idToken. after 90min the session will expire, then I need to refresh with new idToken. how to handle the refresh token service in AWS Cognito using amplify-js. I tried with Auth.currentSession() I will call this for every 1 hour but it's not working for me. 回答1: After a long struggle, I found the solution to update the AWS Cognito refresh token, To do this I am using the

How to properly handle unauthenticated users and requests in AWS Amplify/AppSync React apps?

和自甴很熟 提交于 2020-12-01 13:24:38
问题 I am having a very hard time to figure out how to handle unauthenticated users in a React app which uses AWS Amplify and AWS AppSync. Seems like most docs suggest to wrap the whole app with withAuthenticator HOC from aws-amplify-react but in the real world it is a very rare case. So here how I am setting a client to talk to the AppSync API const client = new AWSAppSyncClient({ url: AppSyncConfig.aws_appsync_graphqlEndpoint, region: AppSyncConfig.aws_appsync_region, auth: { type: AUTH_TYPE