aws-amplify

AWS Amplify AppSync Subscription not working correctly

孤街浪徒 提交于 2021-02-19 05:27:04
问题 I wrote a small application that subscribes to DB changes using AWS Amplify CLI / AppSync. All amplify api calls work perfectly (mutations, queries) but unfortunately the observer does not receive events. I can see that the MQTT socket receives periodically binaries but I can't obtain changed objects. I configured Amplify for amplify use. I can see in the debugger that the AppSyncProvider has been initisalised. Also tried API and PubSub but makes no difference. const awsmobile = { "aws

AWS Amplify AppSync Subscription not working correctly

与世无争的帅哥 提交于 2021-02-19 05:26:35
问题 I wrote a small application that subscribes to DB changes using AWS Amplify CLI / AppSync. All amplify api calls work perfectly (mutations, queries) but unfortunately the observer does not receive events. I can see that the MQTT socket receives periodically binaries but I can't obtain changed objects. I configured Amplify for amplify use. I can see in the debugger that the AppSyncProvider has been initisalised. Also tried API and PubSub but makes no difference. const awsmobile = { "aws

How do I use Cognito to update user pool attributes with android?

南楼画角 提交于 2021-02-17 06:16:05
问题 I'm making an android app and have created a user in my user pool with the Amplify framework. The documenation for amplify says that making calls to get/set attributes isn't built yet, so I guess I need to use cognito directly. I now want to set attributes such as name once the user signs up. Right now I have this code, but I'm not sure what to do from here. CognitoUserAttributes attributes = new CognitoUserAttributes(); attributes.addAttribute("testAttribute", "testValue"); Also I'm

React-router-dom not re rendering Switch when state is change

自作多情 提交于 2021-02-11 17:05:29
问题 I am using aws-amplify, react-hook in my project. The app have some private Routes has been define below: const ProtectedRoute = ({render: C, props: childProps, ...rest}) => { return ( <Route {...rest} render={rProps => (childProps) ? ( <C {...rProps} {...childProps} /> ) : ( <Redirect to={`/login?redirect=${rProps.location.pathname}${ rProps.location.search }`} /> ) } /> ); } In App.js, we change childProps to define whether user is login or not. But when childProps change, Switch not re

React-router-dom not re rendering Switch when state is change

让人想犯罪 __ 提交于 2021-02-11 17:04:26
问题 I am using aws-amplify, react-hook in my project. The app have some private Routes has been define below: const ProtectedRoute = ({render: C, props: childProps, ...rest}) => { return ( <Route {...rest} render={rProps => (childProps) ? ( <C {...rProps} {...childProps} /> ) : ( <Redirect to={`/login?redirect=${rProps.location.pathname}${ rProps.location.search }`} /> ) } /> ); } In App.js, we change childProps to define whether user is login or not. But when childProps change, Switch not re

Referencing AWS S3 bucket name programmatically instead of hardcoded

六眼飞鱼酱① 提交于 2021-02-11 15:23:35
问题 I'm working with AWS Amplify to develop an iOS application. I've added storage through S3 to host some assets and am trying to configure the application to download them. The only issue is that every example I see has the bucket name and path hardcoded, but because I have multiple environments and make new environments sometimes and each bucket has the environment name appended to it, I don't want to have to rewrite the bucket name each time. For example if I'm in my test environment the

AWS Cognito user able to sign in, but API “Does not exist” when using I can access using access token on console?

前提是你 提交于 2021-02-11 12:50:20
问题 Im a bit lost here and would love some help. I am trying to connect my React Native app to a basic Lambda function. I have no bother Registering a user, Confirming a user or Signing in. I can see all of these things in the Cognito Console. I also am able to test the access to the API with the Authorizers part of the API Gateway and get a Response Code: 200 with the correct email from cognito. Here is the code: async signIn(email: string, password: string) { try { //sign in the user const user

Customize colors of withAuthenticator HOC component

强颜欢笑 提交于 2021-02-10 09:23:14
问题 I am trying to customize the colors in withAuthenticator HOC aws-amplifier login screen. I followed: https://aws-amplify.github.io/docs/js/authentication#using-components-in-react and also read: https://medium.com/@coryschimmoeller/customizing-the-authentication-experience-of-amplifys-withauthenticator-e6f2089ff469 import { AmplifyTheme } from 'aws-amplify-react'; const myTheme = { ...AmplifyTheme, BackgroundColor: { color: 'blue',backgroundColor: 'blue' }, button: { color: 'blue'

Customize colors of withAuthenticator HOC component

我的未来我决定 提交于 2021-02-10 09:23:09
问题 I am trying to customize the colors in withAuthenticator HOC aws-amplifier login screen. I followed: https://aws-amplify.github.io/docs/js/authentication#using-components-in-react and also read: https://medium.com/@coryschimmoeller/customizing-the-authentication-experience-of-amplifys-withauthenticator-e6f2089ff469 import { AmplifyTheme } from 'aws-amplify-react'; const myTheme = { ...AmplifyTheme, BackgroundColor: { color: 'blue',backgroundColor: 'blue' }, button: { color: 'blue'

AWS Amplify Ionic 5 Angular 10 build error

与世无争的帅哥 提交于 2021-02-07 11:01:20
问题 Our team at my company has encountered an issue which we can't seem to find the solution to and I was hoping someone here could help us out. We use AWS Amplify in our Angular 10/Ionic 5 project and we do get the following error: Uncaught ReferenceError: exports is not defined at Module../node_modules/@aws-sdk/middleware-serde/build/deserializerMiddleware.js (vendor.js:344144) at __webpack_require__ (bootstrap:84) at Object../node_modules/@aws-sdk/middleware-serde/build/index.js (index.ts:1)