aws-amplify

Publishing Cognito authentication state changes to environmentObject on background thread

风格不统一 提交于 2020-01-15 10:05:06
问题 I am working on a SwiftUI app that utilizes AWS Amplify/Cognito for its authentication. I have created a session object that keeps track of whether a user is authenticated. This session object is an ObservableObject that is loaded into environmentObject and accessed by different views. It has a @Published property called isLoggedIn. Within this session object, a listener has been created to capture changes in authentication state which update the value of isLoggedIn. The code compiles and

Publishing Cognito authentication state changes to environmentObject on background thread

。_饼干妹妹 提交于 2020-01-15 10:00:08
问题 I am working on a SwiftUI app that utilizes AWS Amplify/Cognito for its authentication. I have created a session object that keeps track of whether a user is authenticated. This session object is an ObservableObject that is loaded into environmentObject and accessed by different views. It has a @Published property called isLoggedIn. Within this session object, a listener has been created to capture changes in authentication state which update the value of isLoggedIn. The code compiles and

Angular AWS Amplify authenticator extrra fields

♀尐吖头ヾ 提交于 2020-01-15 05:07:07
问题 I'm trying to use the AWS Amplify with Angular for authentication with Cognito, the problem that I'm facing is, when I call the component: <amplify-authenticator></amplify-authenticator> It does not come with all the fields for Sign up, that I marked as required in Cognito, so it always return a error like: Missing field Name, for example So my question is, if they don't return some of the fields that I marked as required, how can I add it, without having to change the source of the component

AWS Amplify Graphql - TypeError: Must provide Source. Received: undefined

雨燕双飞 提交于 2020-01-14 04:03:05
问题 I am doing my queries exactly as in the documentation (https://aws-amplify.github.io/docs/js/api#amplify-graphql-client) but I keep receiving the following error: TypeError: Must provide Source. Received: undefined The query is as follows: export const listUsers = `query ListUsers( $filter: ModelUserFilterInput $limit: Int $nextToken: String ) { listUsers(filter: $filter, limit: $limit, nextToken: $nextToken) { items { id firstName prefix lastName phone cigarettesDay enableNotifications age

React Router DOM not working correctly on Amplify Console AWS

◇◆丶佛笑我妖孽 提交于 2020-01-12 08:24:31
问题 I have deployed react app on Amplify Console following their documentation. The site is deployed and running fine, I am able to navigate using links but when I try to land to any url directly I get redirected to my configured 404 page. Below is the code I am using ReactDOM.render( <Router> <Route path="/" component={App} /> </Router>, document.getElementById("root"), ); And here is how my route looks like - <Switch> <Route exact path="/" render={(): JSX.Element => <Home auth={this.auth} />} /

npm build (nuxt build) does not create dist folder in amplify(aws codebuild) using nuxt spa mode

眉间皱痕 提交于 2020-01-06 03:52:27
问题 I want to create dist folder, after running 'npm build'(nuxt build) in amplify. I run npm build in my local(mac) , then dist folder is created. I run 'ls -a' after 'npm build' , then dist folder does not exist in amplify. > nuxt build 2019-08-20T01:49:08.598Z [INFO]: # Executing command: ls -a 2019-08-20T01:49:08.602Z [INFO]: . .. amplify.sh amplify.yml assets components .editorconfig .eslintrc.js .git .gitignore layouts middleware node_modules .nuxt nuxt.config.js package.json package-lock

Changing Cognito-User-Pool/AWS-Amplify; leading to SignUp issue

旧城冷巷雨未停 提交于 2019-12-25 03:16:28
问题 I am, handling some SignUp/SignIn process within an iOS app, using AWS-Amplify (and Cognito). It was working fine, but then I decided to require a few more information when signing up. Namely: name, given_name, family_name. Here is the function called to authenticate: func showSignIn() { AWSAuthUIViewController .presentViewController(with: self.navigationController!, configuration: nil, completionHandler: { (provider: AWSSignInProvider, error: Error?) in if error != nil { print("Error

Auto Sign In with Cognito / Amplify Authenticator Components?

扶醉桌前 提交于 2019-12-24 19:25:51
问题 I'm using the Amplify authenticator component (described here) with Cognito User Pools. Right now, adding the basic authenticator to html takes the user through the following process automatically: 1) Sign up 2) Enter verification code sent to email 3) Sign-in: Re-enter user name and password This is based on just adding to html: <amplify-authenticator></amplify-authenticator> So new users sign up, and then right away need to sign in. It would be better if they were automatically signed-in,

Amplify “Unable to verify secret hash for client”

筅森魡賤 提交于 2019-12-23 13:20:53
问题 We have been using Amplify and Cognito to register our users for an Angular6 application deployed to Lambda. The client wanted to transition from email to username as primary user identification. So we created a new user pool / client. I don't have visibility into the configuration settings, I was simply given new user pool, identity pool, and client id's. Then I changed the code for application signup to look like this: return from(Auth.signUp({ 'username': username, // was email 'password':

AWS Amplify: How to setup { withConnector } component?

随声附和 提交于 2019-12-23 05:17:07
问题 Following the Amplify Quick Start I set up an AWS Mobile App with the awsmobile-cli : awsmobile init awsmobile user-signin enable awsmobile push In my react App I configured Amplify like so (I also tried manual configuration): import Amplify from 'aws-amplify'; import aws_exports from '../../aws-exports.js'; Amplify.configure(aws_exports); import { withAuthenticator } from 'aws-amplify-react'; ... export default withAuthenticator(App); This Code shows me the Cognito UI , but on any action, I