ClientMetadata not present in custom challenge triggers

2

I'm trying to implement an custom challenge using Amplify -> Cognito, the issue is that when I call: Auth.signIn({... , validationData: {foo: 'bar'}, {foo: 'bar'}}), the validationData or clientMetadata are present in Define Auth Challenge or Create Auth Challenge triggers as described in the documentation https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-define-auth-challenge.html

It's extremely important to be able to send context to Define and Create Auth Challenge from the client so we could define what challenge was chosen on the client-side, e.g Email, or Sms, or even sending the users language so during sending the challenge the language could be defined to send messages through SNS, and it seems people are managing that in a hacky way by answering a "dummy" challenge just be able to send context to the lambda, here's the discussion in Amplify repo. I'd like to know if someone else went through this issue and figured out another solution and if Cognito team has plan to fix it?

Thanks.

preguntada hace 2 años121 visualizaciones
No hay respuestas

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas