by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Daniel S. Dantas
    @dantasfiles
    @RigoMiranda be aware there's currently a Analytics bug that affects push notifications aws-amplify/amplify-js#4711
    andrestone
    @andrestone
    @AngeloGiurano Have you tried the Cognito API?
    Kgadi Kenneth Mphele
    @k3nnet
    Hi guys. is anyone experiencing problems with running amplify push because of the nodejs8 runtime ?
    Rav Panchalingam
    @ravz
    Hi can someone please provide example of creating monetization event from Javascript ?
    anthosey
    @anthosey
    Hi all, please how can I use a custom components for user interfaces (login, signup etc) without using the default provided by <amplify-authenticator></<amplify-authenticator> in Angular/IONIC app
    chittim412
    @chittim412
    Hello guys, is there any way to add api with GET http method using amplify add api. Please help me
    Guilherme Campos
    @gpirescampos
    Hey there. I'm going insane here trying to figure out something that seems to be quite easy. I've spent the last couple of days searching and trying stuff, but I still haven't managed to get this to work. It's related to using queryStringParameters in the API.get method - I need to return a set of elements from my table given a specific param. I simply cannot get the thing to work. I have an API.put method that's working, so both the API and the app are working correctly, but get just doesn't work - even if I send an API.get without params request, I still get a 404. I understand that this issue has been highly discussed, and supposedly a fix was implemented a while ago for this (since queryStringParameters wasn't a working functionality a while ago). Honestly, anything would be helpful as I'm going crazy trying to figure this out ahah
    Noah Walker
    @walkernel
    Can you use amplify to build react native apps for iOS without access to xCode or a Mac,
    ?*
    Non-expo/ejected react native apps that is.
    Aaron Fay
    @aaronfay
    I have a versioned @model using API.graphql(), how do I go about retrieving an older version of my document? Can I simply pass version into the input?
    The documentation doesn't say anything about this :(
    Aaron Fay
    @aaronfay
    Ahghghg, I have a broken cloudformation template now, "CREATE_FAILED TriggerPermissions", and I can't update anything! Any recommendations on how to fix a broken backend config?
    Guilherme Campos
    @gpirescampos
    @aaronfay you can pull your backend configs from AWS - https://aws-amplify.github.io/docs/cli-toolchain/quickstart#amplify-pull. Not sure if that helps
    Gaurang Bhatt
    @GaurangBhatt

    Hello, I am stuck with the below error when using aws-amplify in my react app. Auth.signIn is returning the confirmed user from cognito pool. I also receive the verification code via SMS. However, when I try to call Auth.sendCustomChallengeAnswer I am getting below error. Note that Auth.signIn and Auth.sendCustomChallengeAnswer are in two different methods. Please advise.

    code
    `
    handleSignIn = (a) => (param) => (e) => {
    if (this.validator.fieldValid('First Name')
    && this.validator.fieldValid('Last Name')
    && this.validator.fieldValid('Phone Number')) {

      let username = "+01" + this.state.phoneNumber.replace(/[^\d]/g, '');
      Auth.signIn({
          username, // Required, the username
      }).then(user => {
        console.log(user);
        this.setState({
          ['formActivePanel' + a]: param,
          ['formActivePanel' + a + 'Changed']: true,
          cognitoUser: user,
        });
      })
      .catch(err => {
        console.log(err);
        //TODO Handle ERROR
      });
    } else {
      this.validator.showMessageFor('First Name');
      this.validator.showMessageFor('Last Name');
      this.validator.showMessageFor('Phone Number');
    }

    }

    handleVerify = () => {
    if (this.validator.fieldValid('Verification code')) {
    let challengeResponse = "123456";//this.state.otpCode;
    let user = this.state.cognitoUser;
    console.log("otpCode:" + challengeResponse);
    console.log(this.state.cognitoUser);

      Auth.sendCustomChallengeAnswer({
        user,
        challengeResponse,
      }).then(user => {
        console.log(user);
      })
      .catch(err => {
        console.log(err);
        //TODO Handle ERROR
      });
    
    } else {
      this.validator.showMessageFor('Verification code');
    }

    }
    `

    ERROR
    [ERROR] 57:50.242 AuthError - Challenge response cannot be empty

    Guilherme Campos
    @gpirescampos
    @GaurangBhatt in order to confirm the registration after receiving the code, I'm using Auth.confirmSignUp not Auth. sendCustomChallengeAnswer. I'm using email confirmation though, not sure if that changes anything
    Gaurang Bhatt
    @GaurangBhatt
    @gpirescampos thanks for quick response. I will try that.
    Guilherme Campos
    @gpirescampos
    This is the actual line await Auth.confirmSignUp(email, code, { forceAliasCreation: true })
    Gaurang Bhatt
    @GaurangBhatt
    Thanks. I am working on login so trying Auth.confirmSignIn

    Now I get below error.. the same thing just that instead of the challenge it is complaining about confirmation code. Console log clearly shows that it is receiving not-null confirmation code

    AuthError - Confirmation code cannot be empty console.<computed> @ index.js:1 ConsoleLogger._log @ ConsoleLogger.ts:91 ConsoleLogger.error @ ConsoleLogger.ts:142 AuthError @ Errors.ts:34 AuthClass.rejectAuthError @ Auth.ts:1976 AuthClass.confirmSignIn @ Auth.ts:889 Header.handleVerify @ Header.js:115

    Guilherme Campos
    @gpirescampos
    Then I guess you must have some sort of parsing error somewhere, and the code isn't being sent correctly. Try, for example, inserting a string where the code goes, and see if you don't get the error anymore. If you stop getting that error, then it's parsing. IF not, then I don't really know
    Gaurang Bhatt
    @GaurangBhatt

    Got past that error... It was related to parsing and how I was sending parameters to sendCustomChallengeAnswer.
    Error
    Auth.sendCustomChallengeAnswer({ user, challengeResponse, })

    Fix -- I had to set otp to String(user inputed value) otherwise I get serialization error
    Auth.sendCustomChallengeAnswer(user, otp)

    Udit Bhatia
    @uditbhatia
    my ampllfy init is failing with error
    init failed
    TypeError [ERR_INVALID_ARG_TYPE]: The 'request' argument must be string. Received type undefined
    Ruslan
    @irsqw_twitter
    hi
    is there any limit of how many relations can be returned when you request something with API.graphql(graphqlOperation))?
    so far I have 3 relations that must be returned when I a request a user, but I get only 2. User has many posts, each post has many comments and each comment has many reactions.
    for some reasons reactions are not returned
    the relation is set up correctly, all keys are present
    seems like it has something to do with the deepness of the relations returned
    Guilherme Campos
    @gpirescampos
    neelabja sen sarma
    @neelabja.sarma_gitlab
    I am getting error when calling lex service from nodejs."message":"Authorization header requires existence of either a 'X-Amz-Date' or a 'Date' header. I am able to hit it from postman. And i have generated the code from Postman itself.
    nissane
    @nissane
    I am trying to implement the amplify react HOC to use AWS cognito. I have followed the guides, but no matter what settings I use, after I authenticate, I am getting back an idtoken, refreshToken, and a accessToken. I only want to get back an access code. I have set my Amplify.configure to { oauth : {responseType: 'code'}} but that does not seem to be doing anything.
    smshiv
    @smshiv
    I am getting following exception when I run amplify init

    init failed
    { Error: write EPROTO 140718692255552:error:14094419:SSL routines:ssl3_read_bytes:tlsv1 alert access denied:ssl/record/rec_layer_s3.c:1543:SSL alert number 49

    at WriteWrap.afterWrite (net.js:788:14)

    message:
    'write EPROTO 140718692255552:error:14094419:SSL routines:ssl3_read_bytes:tlsv1 alert access denied:ssl/record/rec_layer_s3.c:1543:SSL alert number 49\n',
    errno: 'EPROTO',
    code: 'NetworkingError',
    syscall: 'write',
    region: 'ap-southeast-2',
    hostname: 'amplify.ap-southeast-2.amazonaws.com',
    retryable: true,
    time: 2020-01-27T14:37:23.039Z }

    Daniel S. Dantas
    @dantasfiles
    @aaronfay when you put @versioned in a model, it adds a version field to the model and puts some extra logic in the createX, updateX, and deleteX resolvers. Otherwise, the version field is like any other field for queries.
    William Rust
    @willrust
    I'm confused about what to expect from amplify add hosting when I have 2 environments (dev & master). When adding hosting I have the option of DEV & PROD, where PROD would be using CloudFront and HTTPS. My expectation is that after merging my dev and master envs, that only 1 of these hosting options will be used (whichever is merged in), so how should I quickly test out my dev env, if ultimately it should be deployed with CloudFront and HTTPS?
    Martin Juhasz
    @martinjuhasz
    Did anyone run into this issue before? I created a PostConfirmation Lambda (add-user-to-group) using the amplify cli, pushed it, but when it gets invoked it fails with a not authorized error. Seems like the created IAM user has no rights to call getGroup or createGroup on Cognito. Anyone had this before? Or how to resolve this?
    2 replies
    Marcin Kral
    @krlm
    Hi, I'm using Cognito to implement Single Sing On among a few web application (in different technologies, PHP, .NET, Java) and I'd like to provide custom login screen (app) for them - unfortunately customization of Cognito's build-in hosted UI is limited.
    I've found a lot of articles about customization of Amplify Auth UI itself, but I guess it's not what I'm looking for - To make SSO work I'd just need a single app to which other apps redirects (like hosted UI) which then authenticate user against user pool and redirects user back to the origin app. Unfortunately I cannot find any examples of such app, which is strange because I'd suppose that it's quite common requirement.
    Mickael Lecoq
    @mlecoq
    Hi, I am using amplify and Appsync. I would like to manage createdAt and updatedAt fields on server side (in order to avoid false values from clients) and to use them in indexes. Is it possible to define fields in @model in a read only mode (and automatic updates)
    Daniel S. Dantas
    @dantasfiles
    @martinjuhasz Make sure your amplify\backend\auth\XXX\XXX-cloudformation-template.yml has the right permissions (cognito-idp:AdminAddUserToGroup, cognito-idp:GetGroup, cognito-idp:CreateGroup) in the # Updating lambda role with permissions to Cognito section of the file. If not, you might want to redo the auth setup.
    Daniel S. Dantas
    @dantasfiles
    @mlecoq The Mutate.createX.req.vtl resolvers generated by Amplify have a line $util.qr($context.args.input.put("createdAt", $util.defaultIfNull($ctx.args.input.createdAt, $util.time.nowISO8601()))).
    You can change that to $util.qr($context.args.input.put("createdAt", $util.time.nowISO8601()))to prevent the user from overriding the createdAt value.
    Same with updatedAt in the updateX resolvers.
    I don't know a way to do it automatically in the model though.
    Mickael Lecoq
    @mlecoq
    @dantasfiles thanks I will try that
    shayaun-nejad
    @shayaun-nejad
    Hello, I am having troubles signing a federated identity to access my API Gateway on React-Native. I have enabled IAM authorization on my lambda endpoints. So the federated identity is returning the correct temporary credentials from AWS, and it is creating an authenticated session with Amplify. Also when I send a request via PostMan to API Gateway using these same credentials that are generated, it works. However, I am getting a 403 error when I send the request from my react native code
    I am pretty confident this is because the signing method on the request headers does not work
    from my axios request
    and I would like to use Amplify's API module but there is no easy way for me to specify the Authorization in the aws-configuration
    I have tried using libraries like aws4 to sign, but they seem to not be working as well
    any recommendations ?
    Martin Juhasz
    @martinjuhasz
    @dantasfiles thanks daniel. i figured that this endpoint gets not triggered when i create a user in the cognito interface, just when using signup. the errors i was getting resulted when testing it in the lambda interface with the test functionallity, somehow permissions are not present there. after signup it works fine