question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Create auth challengeMetadata does not show up in the signIn response

See original GitHub issue

Describe the bug When setting:

event.response.challengeMetadata = "00000000-0000-0000-0000-000000000000";
callback(null, event);

in the Cognito create auth lambda, the property does not show up in response from the call to Auth.signIn, which returns:


CognitoUser {
  username: 'xxxxxxx',
  pool: CognitoUserPool {
    userPoolId: 'eu-west-1_xxx',
    clientId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxx',
    client: Client {
      endpoint: 'https://cognito-idp.eu-west-1.amazonaws.com/',
      fetchOptions: {}
    },
    advancedSecurityDataCollectionFlag: true,
    storage: InMemoryLocalStorage { store: {} }
  },
  Session: redacted',
  client: Client {
    endpoint: 'https://cognito-idp.eu-west-1.amazonaws.com/',
    fetchOptions: {}
  },
  signInUserSession: null,
  authenticationFlowType: 'CUSTOM_AUTH',
  storage: InMemoryLocalStorage { store: {} },
  keyPrefix: 'CognitoIdentityServiceProvider.xxxxxxxxxxxxxxxxxxxxxxxxxxx',
  userDataKey: 'CognitoIdentityServiceProvider.xxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  challengeName: 'CUSTOM_CHALLENGE',
  challengeParam: {
    fingerprintId: '00000000-0000-0000-0000-000000000000',
    pinDigits: '[{"value":null,"label":"2nd"},{"value":null,"label":"4th"},{"value":null,"label":"5th"}]'
  }
}

As you can see I can probably work around it using the challenge parameters, but I was expecting to see challengeMetadata in the response.

The property is documented here,

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
alastair-toddcommented, Feb 1, 2021

@damien-monni nope. seems everyone, stalebot included, have their head in the sand on this one.

If you want to send metadata then you will need to send it in the publicChallengeParameters property - the only way you could possibly handle multiple challenges currently.

sorry aws but cognito is a dogs’s dinner.

1reaction
stale[bot]commented, Oct 12, 2020

This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create Auth challenge Lambda trigger ... - AWS Documentation
This Lambda trigger is invoked to create a challenge to present to the user. The request for this Lambda trigger includes the challengeName...
Read more >
Create Auth challenge Lambda trigger ... - 亚马逊云科技
The request for this Lambda trigger includes the challengeName and session . The challengeName is a string and is the name of the...
Read more >
Unrecognized Verify Auth Challenge Lambda response C# ...
The first time you enter the define auth challenge lambda, this error doesn't show up, because the session doesn't contain any challenge ......
Read more >
Authentication - Sign in with custom flow - Swift - Amplify Docs
Use AWS Cognito Auth plugin to sign in a user into AWS Cognito User Pool using ... if the response from the end...
Read more >
Passwords are too mainstream. Use your phone instead!
Read on to learn how to implement passwordless sign-in via SMS login, using custom auth flows on Amazon Cognito and Amazon Pinpoint.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found